Is there any way of performing a substitution in a case insensitive way?

asked 07 Sep '12, 07:24

Alberto%20Esparza's gravatar image

Alberto Esparza
accept rate: 50%

This is possible with regular expressions.

Case insensitive regular expressions can be enabled by specifying (?i) at the beginning of an expression. For example:

<preBuildActionList> ... <substitute> <type>regexp</type> <substitutionList> <substitution> <pattern>(?i)directory=</pattern> <value>installdir=</value> </substitution> </substitutionList> </substitute> </preBuildActionList>

This will replace in case insensitive matter - for example all of directory=, Directory= and DIRECTORY= to installdir=.


answered 07 Sep '12, 11:17

wojciechka's gravatar image

wojciechka ♦♦
accept rate: 26%

Thanks! It worked just fine, that's what I was looking for.

Thanks a lot!

(10 Sep '12, 03:18) Alberto Esparza
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 07 Sep '12, 07:24

Seen: 1,025 times

Last updated: 10 Sep '12, 03:18