PDA

Click to See Complete Forum and Search --> : [RESOLVED] Reg Ex in TextPad


FishGuy
Jan 3rd, 2007, 07:28 AM
Hi,

Using TextPad can I use Reg Ex Find and Replace somehow to change a file formatted like

7000 Sean Lockley Canvass
6700 Caren Larkman Canvass
4200 Toyon St-Hiliare Canvass
2200 Nick Metcalfe Canvass
1200 Adam Conway Canvass
73949 Richard Harker Inbound
70425 Mark Butler Inbound

To look like

6700|"Sean Lockley"|"Canvass"
5150|"Adam Conway"|"Canvass"
76331|"Richard Harker"|"Inbound"
59745|"Mark Butler"|"Inbound"
50940|"Stephen Riddiough"|"Inbound"
32695|"Neil Moore"|"Inbound"

If not whats the best way?

I have 34 files like this to change.

DeadEyes
Jan 3rd, 2007, 11:06 AM
you could try this two step process
1. Find: (\s*\t|\t) Replace: "|"
2. Find: (\d)" Replace: $1
That's assuming that the replace allows subexpressions
If it doesn't see does it support lookbehinds (?<=\d)" and replace with blank