I have a csv file I'm trying to edit in text pad...it has many lines that are similar to this:
faxnumber,firstname,lastname
18139887605,Bill Kyser,Bill Kyser
18139950930,Linda Register,Linda Register
What I would like is to do is this:
faxnumber,firstname,lastname
18139887605,=LEFT("Bill Kyser",20),Bill Kyser
18139950930,=LEFT("Linda Register",20),Linda Register
I just can't figure out how to step by step do something like this, i.e. how to select text, tell textad to find and replace by inserting the =LEFT, etc.
Thanks in advance.
Find and Replace Question
Moderators: AmigoJack, bbadmin, helios, MudGuard
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
Use a regular expression search and replace:
Reference Information | Regular Expressions and
How to... | Find and Replace Text | Use Regular Expressions.
This assumes you are using Posix regular expression syntax:Find what: ^([0-9]+,)([^,]+)
Replace with: \1=LEFT("\2",20)
[X] Regular expression
Replace All
Look in TextPad's help underConfigure | Preferences | Editor
[X] Use POSIX regular expression syntax
Reference Information | Regular Expressions and
How to... | Find and Replace Text | Use Regular Expressions.