edit deliniated text

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
jonsea212
Posts: 1
Joined: Thu Dec 04, 2003 6:42 pm

edit deliniated text

Post by jonsea212 »

Hi,

I have a deliniated text file that has 7 populated fields. Each field is seperated by a comma. What i want to do is find and replace only one field. Say like a find and replae on field 6 or field 7 etc.


thanks in advance,

jon
User avatar
talleyrand
Posts: 624
Joined: Mon Jul 21, 2003 6:56 pm
Location: Kansas City, MO, USA
Contact:

Post by talleyrand »

Hello,
I suspect a regular expression would suit your needs, basically one that says I want to search and replace between the fifth and sixth instance of (whatever marker the file uses (commas, pipes, tabs)) where it looks like this. I think that would work but alas my regexp foo is not great.

The quick and dirty method would be to use OpenOffice's spreadsheet application (or that other office spreadsheet) and edit it through there.
I choose to fight with a sack of angry cats.
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

talleyrand is right of course, but IMHO Bill has already sold way to
many copies of that other office spreadsheet! :wink: HTH

Using POSIX
find (([^,]*,){6})string1(.*)
replace \1string2\3
Then I open up and see
the person fumbling here is me
a different way to be
Post Reply