mean? What are the rules here, and what the tokens? And what does the "2 word" mean?object-group <protocol object-group name> (2 word)
With the stuff Yves did in 2006/2007 for the regex engine, you can write patterns that match anything that can be given in a BNF, but I cannot make out from your post what it is you want to parse.
Note however that if you really want to parse, single regexes aren't so suitable. Patterns are great for extracting and validation, but are rather kludgy for parsing. Because typically when you parse, you want to know the structure of they thing you parsed, and act accordingly. Regexes typically tell you they matched "abc", but won't tell you whether how that "abc" is composed (that is, if you'd have a regexp to parse English sentences, it will tell you that "John eats an apple" is a proper sentence, but it won't tell you it's composed as subject-verb-object, with the subject a proper name, the verb third person singular (present tense), and the object being "definite article-noun").
In reply to Re: Regex to match a Cisco ACL
by JavaFan
in thread Regex to match a Cisco ACL
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |