PDA

View Full Version : Regular expression for Replace in Files


raistlin
08-19-2016, 05:44 AM
Hi Kinook,


I have a hard time trying to figure out what's wrong with my regex.
I am removing lines in AssemblyInfo.cs that matches this regex:

(.*)?\[assembly:(.*)?Assembly(FileVersion|Company|Copyrig ht|InformationalVersion)(.*)

This worked on several tools i used to develop the regex but when ported over to VBP, it kept giving me issues like this:

Error expanding macros or script in property Find: (.*)?\<Error parsing script at position 86>


I tried to work on escaping "[" without avail. Help please? Thank you.

BR
Lee

raistlin
08-19-2016, 06:23 AM
Nevermind, figured it out myself. An extra [ to [ without removing \.

(.*)?\[[assembly:(.*)?Assembly(FileVersion|Company|Copyrig ht|InformationalVersion)(.*)