regular expression craziness

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
jayritchie
Posts: 3
Joined: Fri Mar 05, 2004 6:43 pm

regular expression craziness

Post 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.
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

Try using [[:space:]] - HTH
Then I open up and see
the person fumbling here is me
a different way to be
jayritchie
Posts: 3
Joined: Fri Mar 05, 2004 6:43 pm

Post 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.
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

[[:space:]]+ works for me
Then I open up and see
the person fumbling here is me
a different way to be
jayritchie
Posts: 3
Joined: Fri Mar 05, 2004 6:43 pm

Post by jayritchie »

Thanks, that worked.
Post Reply