[thelist] RegEx problem again

Hershel Robinson hershelr at netvision.net.il
Mon Aug 8 10:48:09 CDT 2005


> Which worked just fine, till we realized we need to allow one or more SPACES as well! How do you
> add a space to the pattern? (and allow for as many spaces as they like?)

I am not a regex expert, but generally it depends on what implementation 
you are using. On some, just using a space (fancy that) will work. To 
allow for an unlimited number, add an asterisk after the space to 
indicate 'zero or more times'

Other implementations may require an escape character for space, for 
example [:blank:] matches space or tab in some implementations and \s 
matches any whitespace in most implementations (not just space).

So you can play with these until you get what you want.

HTH,
Hershel


More information about the thelist mailing list