Results 1 to 2 of 2

Thread: [RESOLVED] Reg Ex in TextPad

  1. #1

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Resolved [RESOLVED] Reg Ex in TextPad

    Hi,

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

    Code:
    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

    Code:
    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.

  2. #2
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196

    Re: Reg Ex in TextPad

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width