From: Scott Morris (swm@emanon.com)
Date: Tue Jan 13 2004 - 01:56:59 GMT-3
Correct. But the "." is part of the string in between spaces "_"... So
that makes things a little different. The "*" outside the parentheses would
be for multiples of that match. Otherwise the string would match only one
single AS (or just one space) between those two numbers.
You have to remember that the match will come as the ENTIRE string that you
are set up to match. If you don't place wildcards like that "*" outside the
paren, then you are limiting the overall string size and won't get as many
matches.
That MAY be your intent, but the way I was reading the original post, that
wasn't the intent. Hence the correction.
Hope that helps.
Scott
-----Original Message-----
From: Tim Fletcher [mailto:groupstudy@fletchmail.net]
Sent: Monday, January 12, 2004 2:05 PM
To: Scott Morris; 'Nathasha Aleyevka'; ccielab@groupstudy.com
Subject: RE: Regular Expressions
At 05:05 PM 1/10/2004 -0500, Scott Morris wrote:
<snip>
>If you had the last string as ...75 (since 5 characters is the max set
>anyway), then that would be great for anything ending in 75. But the
>"(_|_.*_)" refers to the single space or anything within that one AS
>set (between spaces). If you wanted to have it pass through multiple
>(as many as necessary) systems, you woul duse the "(_|_.*_)*" instead.
>That * on the outside of the parentheses treats the entire thing as a "0 or
more of"
>match.
Scott,
I would have to disagree with you on this. Remember that "." matches any
character, including spaces, and that wildcards are greedy. So "_.*_" will
match as many characters, including spaces that it can. So the "*" outside
the parentheses wouldn't really make any difference.
-Tim Fletcher
This archive was generated by hypermail 2.1.4 : Mon Feb 02 2004 - 09:07:43 GMT-3