[CLUE-Tech] Regular Expression in ViA

Randy Arabie randy at arabie.org
Fri Mar 22 14:23:55 MST 2002


I'm having a brain cramp with regard to regular expressions in 
vi.

I have a text file I'm preparing for an import into a db.  I need 
to remove all the hypens from the phone numbers in one field.

I tried:

	:%s/[0-9]-[0-9]//g

Which removed all of the hypens, AND all the numbers on either side :-(

I can't replace all hyphens, as there are some in other fields.  It is 
safe to replace ANY hyphen BETWEEN two numbers.

If possible, please CC randyarabie at enecotech.com on any response.

TIA

-- 
Cheers!

Randy

================================================================
Randy Arabie
GnuPG Key Info -- 

 Fingerprint: 7E25 DFA2 EF72 9551 9C6C  8AA6 6E8C A0F5 7E33 D981
 Key ID: 7C603AEF
 http://www.arabie.org/keys/rrarabie.gnupg
================================================================




More information about the clue-tech mailing list