Page 1 of 1
regular expression craziness
Posted: Fri Mar 05, 2004 6:46 pm
by jayritchie
I'm simply trying to search for white space using \s. Unfortunately, it's selecting "\" and "s". What's going on? I've had other weird problems too, but this one is a big problem right now. I need to replace all white space with tabs.
Posted: Fri Mar 05, 2004 6:55 pm
by s_reynisson
Try using [[:space:]] - HTH
Posted: Fri Mar 05, 2004 7:06 pm
by jayritchie
Thanks for the quick reply. That expression finds single spaces. How about treating consecutive spaces as one match? I tried [[:space:]]* and putting the * in various places but that didn't work.
Posted: Fri Mar 05, 2004 7:15 pm
by s_reynisson
[[:space:]]+ works for me
Posted: Fri Mar 05, 2004 7:51 pm
by jayritchie
Thanks, that worked.