[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Posix character classes in Regular expressions
On Mon, Apr 12, 2004 at 11:39:01AM -0400, Drews, Jonathan* wrote:
> Note that the second script uses [[:space:]]* instead of [:space:]*. Why
> does [[:space:]]* pickup the multiple spaces but not [:space:]*?
[[:space:]] is correct. Think of it this way... [:space:] expands to
space, tab, etc. [] around all that says that you want to match any
of those things.
You can also do things like [^[:space:]] (for "not a space") or
[[:space:],;] (for "any space character, comma, or semicolon").
Steve
--
steve@silug.org | Southern Illinois Linux Users Group
(618)398-7360 | See web site for meeting details.
Steven Pritchard | http://www.silug.org/
-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.