General questions about using TextPad
Moderators: AmigoJack , bbadmin , helios , Bob Hansen , MudGuard
dabombst
Posts: 11 Joined: Tue Nov 01, 2005 7:24 pm
Post
by dabombst » Mon Mar 27, 2006 6:30 pm
Hi
I need to delete from the "\" to the ";", but dont want the semicolon to be delete.
Export002\AIG 005647-AIG 005647;AIG 005647-AIG 005647.T
Export00200\AIG 005648-AIG 005648;AIG 005648-AIG 005648.T
Export0022\AIG 005649-AIG 005649;AIG 005649-AIG 005649.T
to look like this...
Export002;AIG 005647-AIG 005647.T
Export00200;AIG 005648-AIG 005648.T
Export0022;AIG 005649-AIG 005649.T
thanks
SteveH
Posts: 327 Joined: Thu Apr 03, 2003 11:37 am
Location: Edinburgh, Scotland
Contact:
Post
by SteveH » Mon Mar 27, 2006 6:59 pm
You need to use the following regular expression:
Find:
\\.*;
Replace with:
;
This finds instances of \ (the initial \ escape character makes this a literal backslash) followed by any character (.) repeated (*) and followed by a ;. This string is replaced with a ;
Niels H. Veldhuijzen
Posts: 15 Joined: Mon Apr 19, 2004 12:12 pm
Location: Zutphen, The Netherlands
Contact:
Post
by Niels H. Veldhuijzen » Mon Aug 21, 2006 12:51 pm
Dear SteveH,
Are you sure this will work when there are two or more semicolons in one line? :(
Yours sincerely,
Niels H. Veldhuijzen
Zutphen, The Netherlands
ben_josephs
Posts: 2461 Joined: Sun Mar 02, 2003 9:22 pm
Post
by ben_josephs » Mon Aug 21, 2006 1:00 pm
If you want to delete from the first '
\ ' to the
first '
; ' following, use:
Fi nd what: \\[^;]*;
Rep lace with: ;
[X ] Regular e xpression