Page 1 of 1
Use of Wildcard
Posted: Mon Sep 13, 2010 8:35 pm
by Vijay
Hello, i have multiple files having records such as below.
numericInput name="NumericInput5" text1
numericInput name="NumericInput6" text1
numericInput name="NumericInput7" text1
Here, I want to use wild card on number 5,6,7 and so on. Can someone please send me the exact syntax ?
Thanks,
Vijay
Posted: Mon Sep 13, 2010 8:56 pm
by Fool4UAnyway
Well, you more or less almost specified it correctly yourself:
numericInput name="NumericInput\d+" text1
\d = [0-9] = any single digit
+ = any consecutive string of at least one
This matches any positive number. I assume you also want 10 and further to match.
Posted: Thu Oct 07, 2010 10:37 am
by Boondoggle
How can i replace anything between paranthesis "test(123)" with "test(321)" ?
Posted: Thu Oct 07, 2010 10:44 am
by Boondoggle
ie im thinking of something like "test(*)" as in DOS
Posted: Thu Oct 07, 2010 9:25 pm
by Fool4UAnyway
Because parentheses have a special meaning, if you want to match the actual characters, you'll have to use an escape character \ in front of them.
Figure out what this does and why.
Find:
test\((\d)(\d)(\d)\)
Replace by:
test($3$2$1)
In the Replace by expression, you can just use the actual characters. You may have found out what $3$2$1 does and also what function the unescaped parentheses perform.
Posted: Thu Oct 07, 2010 9:27 pm
by Fool4UAnyway
"Anything between parentheses"
=
An opening parenthesis
+
Any characters not being the closing parenthesis
+
The closing parenthesis =
\([^\)]*\)
Posted: Thu Dec 09, 2010 7:52 pm
by Boodoggle
Ah! Worked perfectly! Very useful! Thank you!

Posted: Thu Dec 09, 2010 7:53 pm
by Boondoggle
hmm might use textcrawler to correct my handle
