From: Tim Fletcher (groupstudy@fletchmail.net)
Date: Fri Jan 16 2004 - 00:53:41 GMT-3
Yes, exactly.
-Tim Fletcher
At 04:30 AM 1/14/04, Scott Morris wrote:
>Mmmm... Ok, I see the point you're making... So the "." (any 1 character)
>followed by the "*" (0 or more of the previous) would match any character
>including any spaces being involved.
>
>It does actually work that way. So every once and a while I get to adjust my
>thinking! (Or I just have more caffeine on board today!)
>
>The items are in parentheses in order to group things together. The fact
>that you are using the "|" for a logical OR leans you toward using the paren
>to isolate which things are being OR'd.
>
>Scott
>
>
>
>-----Original Message-----
>From: Tim Fletcher [mailto:groupstudy@fletchmail.net]
>Sent: Tuesday, January 13, 2004 9:46 PM
>To: Scott Morris; 'Nathasha Aleyevka'; ccielab@groupstudy.com
>Subject: RE: Regular Expressions
>
>Scott,
>
>Well for starters, I get a syntax error when I try to enter "(_|_.*_)*".
>Aside from that, I still disagree with your logic, but I do have take back
>my statement that the asterisk outside the parenthesis is irrelevant. It
>actually can have an impact that is not what you might expect.
>
>_12(_|_.*_)34_
>
>If I understand your point, you would say that the above would match "12 34"
>and "12 45 34", but not "12 45 67 34". I maintain that it would as follows.
>
>"_" - matches the beginning of the string "12" - would of course match the
>12 in the string At this point, we have 2 optional matches within the
>parenthesis. This case, will match the 2nd one.
>"_" - would match the space after the "12"
>".*" would match "45 67"
>"_" - would match the space before the "34"
>"34" - would match the "34"
>"_" - would match the end of the string
>
>The problem with the asterisk outside the parenthesis (aside from the syntax
>error) is that it means match 0 or more of the preceding character, or in
>this case group of characters. So lets look at several ways this could work.
>1st, we could have 0 occurrences of what's in the parenthesis, which would
>match "1234", which is probably not what we had in mind.
>
>2nd, it could match 1 occurrence of what's in the parenthesis, which as
>shown above, will match any AS path that went through AS 34 and AS 12 (in
>that order).
>
>For the 3rd case, lets look at what we get if we try to match 2 occurrences
>of what's in the parenthesis. Since we have 2 options within the
>parenthesis, this will give 4 possible regular expression combinations (the
>parenthesis are just to make it more readable).
>
>(_)(_)
>(_)(_.*_)
>(_.*_)(_)
>(_.*_)(_.*_)
>
>The problem with these regular expressions is that they all require 2
>characters that math the "_" wildcard in a row. Offhand I can't think of any
>AS path strings that would meet that criteria.
>
>-Tim Fletcher
>
>At 11:56 PM 1/12/04, Scott Morris wrote:
>>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
>>
>>_______________________________________________________________________
>>Please help support GroupStudy by purchasing your study materials from:
>>http://shop.groupstudy.com
>>
>>Subscription information may be found at:
>>http://www.groupstudy.com/list/CCIELab.html
This archive was generated by hypermail 2.1.4 : Mon Feb 02 2004 - 09:07:46 GMT-3