Page 1 of 1

Search and replace expression

Posted: Fri Jan 12, 2007 8:04 pm
by Siaruzb
Hi,

I have following commands in my program:

+ M2 [STDDEV F40.1]
…
+ M30 [STDDEV F40.1]
..
+ M42 [STDDEV F40.1]
…

I have to take out all this expressions from my text. I mean I would like to search and replace “+ M* [STDDEV F40.1]� with “ �.

Please advise how can I do that?

Thanks.

Posted: Fri Jan 12, 2007 8:14 pm
by SteveH
You need to perform the following search and replace:

Find:
\+ M[0-9]+ \[STDDEV F40.1\]
Replace:
BLANK
With regular expression enabled and using POSIX regular expression syntax.

This is basically what you suggested but using a class [0-9] to define the numbers, this is repeated at least once +. Some of the characters you are searching for have specific meaning in a regular expression so they need to be made literal using \.

Hope this helps.

Thank you very much...

Posted: Fri Jan 12, 2007 8:24 pm
by Siaruzb
It works! Thank you very much...

Posted: Fri Jan 12, 2007 8:30 pm
by SteveH
No problem. Glad to help.