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
21224
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=.

link

answered 07 Sep '12, 11:17

wojciechka's gravatar image

wojciechka ♦♦
7.8k61122
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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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

Tags:

×10
×2

Asked: 07 Sep '12, 07:24

Seen: 1,025 times

Last updated: 10 Sep '12, 03:18