I have a line of text in which exists a pattern with which I want to repalce the whole line.
The pattern is w[0-9][0-9]u99s
An example of one line is:
105 "from w03u999s w03 "+
I would like to replace the entire line with the instance of the pattern found so it should replace:
105 "from w03u999s w03 "+
With this:
w03u999s
Can anyone please help me figure this out?
Thanks,
Matt
replace line with instances of pattern found
Moderators: AmigoJack, bbadmin, helios, MudGuard
-
matty1stop
- Posts: 5
- Joined: Mon Jan 09, 2006 4:55 pm
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
-
matty1stop
- Posts: 5
- Joined: Mon Jan 09, 2006 4:55 pm
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
TextPad's help on its regular expressions is rather brief. Look under
Reference Information | Regular Expressions,
Reference Information | Replacement Expressions and
How to... | Find and Replace Text | Use Regular Expressions.
There are many regular expression tutorials on the web, and you'll find recommendations for some of them if you search this forum.
A standard reference 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.
Reference Information | Regular Expressions,
Reference Information | Replacement Expressions and
How to... | Find and Replace Text | Use Regular Expressions.
There are many regular expression tutorials on the web, and you'll find recommendations for some of them if you search this forum.
A standard reference 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.