I one of my product i build a file renaming system. User has many options to rename file. Among those we have some string replace cases.
At first we tried String.Replace Method (System) to replace texts. Below code snipped is given how things look, the code is simple and may seems different as it taken from different context.
Now the client wanted the replacement as such so that the search string should be case insensitive. Trick is simple we have to use regex in place of normal string replace, but with Regex option set to ignore case. Below code segment is given to show how it is done.
Last trick, while searching for text for first index, there is option to state ignoring case we have to use it.
Until next time.