[c-nsp] cisco regex puzzle of the day
Saku Ytti
saku at ytti.fi
Thu Mar 12 05:50:13 EDT 2015
On (2015-03-12 01:12 +0000), Mack McBride wrote:
Hey,
> The junos expression in question DOES NOT involve backtracking.
> After a match there is no need to backtrack.
>
> The expression in question goes character by character excluding the 64500.
> Note the last part matches 6 digit ASNs that start with 64500.
I think we miscommunicated. Originally I explained IOS does not work, because
it does backtracking, not talking about JunOS at all.
Then you mentioned that particular JunOS example does not do backtracking,
which I understood you claiming JunOS does not support backtracking at all
So to summarize, both IOS and JunOS do backtracking, and it cannot be turned
off. But indeed, ^64500+ [^64500] does not require backtracking, 64500+ never
needs to be unconsumed to satisfy the [^64500]
--
++ytti
More information about the cisco-nsp
mailing list