[nsp] regexp question
David Flynn
davidf at woaf.net
Tue Apr 6 10:31:56 EDT 2004
Hi Peter,
You have to use the backreference because doing ([^_])+ attempts to apply
that pattern to an input as many times as possible - it doesn't ensure that
it matches the same thing twice (ie, 11 and 123 would match the above).
The generic solution is:
^([^_]_)\1*([^_]_)\2*$
HOWEVER, I just crashed a 7200 running 12.2(18)S2 by attempting to use a
backreference. YMMV.
..david
More information about the cisco-nsp
mailing list