General questions about using TextPad
Moderators: AmigoJack , bbadmin , helios , Bob Hansen , MudGuard
Soteriologist
Posts: 10 Joined: Tue Nov 14, 2006 2:29 am
Post
by Soteriologist » Thu Oct 18, 2007 9:06 pm
I'm just wondering if it's possible to search for two different strings at one time and depending on which one is found, replace them with a corresponding string.
In example I want to find:
OR
and replace them with
OR
For the find I'm using this:
Code: Select all
(Inherits="[^_]+_|Partial Class [^_]+_)
But what do I place in the replace field???
"Education is the progressive realization of our own ignorance" - Sir Albert Einstein
ben_josephs
Posts: 2461 Joined: Sun Mar 02, 2003 9:22 pm
Post
by ben_josephs » Thu Oct 18, 2007 9:54 pm
F ind what: (Inherits="[^_]+_)|(Partial Class [^_]+_)
R eplace with: ?1(Inherits="):?2(Partial Class)
[X ] Regular ex pression
[X ] Repl acement format
Search for
conditional expression in WildEdit's help.
Soteriologist
Posts: 10 Joined: Tue Nov 14, 2006 2:29 am
Post
by Soteriologist » Thu Oct 18, 2007 10:00 pm
Thanks as always for the quick reply ben_josephs!
AWESOME!!! IT WORKS!!!
"Education is the progressive realization of our own ignorance" - Sir Albert Einstein