[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Posix character classes in Regular expressions



Hi:

 I use the following Ex script,
:%s/.[0-9]\.[0-9]\{3\}[:space:]*//
 to remove the first column of numbers from:
 7.928		 3390.997
12.106		 5079.763
   
 7.954		 3395.894
12.081		 5092.287

To get this:
   
		 3390.997
		 5079.763
   
		 3395.894
		 5092.287

However if I use 
:%s/.[0-9]\.[0-9]\{3\}[[:space:]]*// 
I get this:

3390.997
5079.763

3395.894
5092.287

Note that the second script uses [[:space:]]* instead of [:space:]*. Why
does [[:space:]]* pickup the multiple spaces but not [:space:]*? 


TIA
Jonathan


-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.