You are of course correct.
I answered quickly about to run out the door without thinking the whole thing through and was quickly thinking about a ^ matching the beginning of a literal string. Which it does. Except as Matthew pointed out - when directly following a open sqaure bracket with one/other character(s) inside - then it matches anything except what is in the square brackets.

Frog - For some more fun reading:

http://www.cisco.com/en/US/docs/ios/12_2/termserv/configuration/guide/tcfaapre_ps1835_TSD_Products_Configuration_Guide_Chapter.html
http://en.wikipedia.org/wiki/Regular_expression

And if you are REALLY bored:
http://www.regular-expressions.info/

And in real life (not the lab unfortunately) - there is always RegexBuddy: Learn, Create, Understand, Test, Use and Save Regular Expression GREAT for creating terribly complex regex patterns for programming languages.

Cheers and thanks for correcting my error Matthew!

--
Mark Snow
CCIE #14073 (Voice, Security)

Senior Technical Instructor - IPexpert, Inc.

Telephone: +1.810.326.1444
Fax: +1.309.413.4097
Mailto: [EMAIL PROTECTED]
--
Join our free online support and peer group communities: 
http://www.IPexpert.com/communities
--
IPexpert - The Global Leader in Self-Study, Classroom-Based, Video-On- Demand and Audio Certification Training Tools for the Cisco CCIE R&S Lab, CCIE Security Lab, CCIE Service Provider Lab , CCIE Voice Lab and CCIE Storage Lab Certifications.
--

On Jun 4, 2008, at 9:59 PM, Matthew Bynum wrote:

The ^ imediately after the open bracket ( as in [^ ) means anything EXCEPT whatever is inside the brackets. So in your example:

pattern#1 = destination-pattern 7[^4]...$
pattern#2 = destination-pattern 74...$

Pattern #1 would match 75111 but not 74111.
Pattern #2 would match 74111 but not 75111.



 :)



On Wed, Jun 4, 2008 at 4:30 PM, FrogOnDSCP46EF <[EMAIL PROTECTED]> wrote:
Hi group,

pattern#1 = destination-pattern 7[^4]...$
pattern#2 = destination-pattern 74...$

Can anyone tell me whats the difference between patter1 vs pattern 2?


--
Smile, you'll save someone else's day!
Frog



--
Matthew Bynum
Senior Consultant
ProSys

Reply via email to