I've been trying to tell WildEdit to search the content in numerous files and change this XML tag -
<FromDate>05/01/2009</FromDate>
to this -
<FromDate>08/13/2009</FromDate>
If the "before" tag is always 05/01/2009, it's no problem, but there are many instances where the dates in these files are not always the same, so I've been trying to employ the use of wild cards to change the date to 08/13/2009 regardless of what the date is currently. I've searched the help topics and tried the dot (.), the asterisk, etc. but i can't seem to employ the wild card correctly. what am i doing wrong? can somebody please instruct me as to what my search string should be so that I can make all of those tags the same?
Thank you.
Question on proper use of wild cards
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
Don't confuse regular expressions with wildcard expressions. They are quite different, and regular expressions are far more versatile.
A dot matches any single character (other than a newline). The star is an operator indicating repetition: for example, X* matches any number (possibly zero) of Xs.
This will do what you want:
A standard reference for regular expressions is
Friedl, Jeffrey E F
Mastering Regular Expressions, 3rd ed
O'Reilly, 2006
ISBN: 0-596-52812-4
http://regex.info/
But be aware that the regular expression recogniser used by TextPad is very weak compared with modern tools. So you may get frustrated if you discover a handy trick that works elsewhere but doesn't work in TextPad.
And, of course, there is TextPad's own (rather brief) help, under
Reference Information | Regular Expressions,
Reference Information | Replacement Expressions and
How to... | Find and Replace Text | Use Regular Expressions.
A dot matches any single character (other than a newline). The star is an operator indicating repetition: for example, X* matches any number (possibly zero) of Xs.
This will do what you want:
There are many regular expression tutorials on the web, and you will find recommendations for some of them if you search this forum.Find what: <FromDate>../../....</FromDate>
Replace with: <FromDate>08/13/2009</FromDate>
[X] Regular expression
Replace All
A standard reference for regular expressions is
Friedl, Jeffrey E F
Mastering Regular Expressions, 3rd ed
O'Reilly, 2006
ISBN: 0-596-52812-4
http://regex.info/
But be aware that the regular expression recogniser used by TextPad is very weak compared with modern tools. So you may get frustrated if you discover a handy trick that works elsewhere but doesn't work in TextPad.
And, of course, there is TextPad's own (rather brief) help, under
Reference Information | Regular Expressions,
Reference Information | Replacement Expressions and
How to... | Find and Replace Text | Use Regular Expressions.
-
- Posts: 3
- Joined: Thu Mar 12, 2009 6:09 pm
Question on proper use of wild cards
ben -
thank you very much! as it turns out, i was close, but had not checked the "regular expression" checkbox. that was my downfall. i appreciate your help!
thank you very much! as it turns out, i was close, but had not checked the "regular expression" checkbox. that was my downfall. i appreciate your help!