On Fri, 2019-01-04 at 00:34 +0100, Peter Rathlev wrote:
> When testing on IOS 15.2 it seems that the regular expression has an
> implicit anchor in the beginning ("^"). If you don't mind the extra
> whitespace in front of the result then a short version is:
> 
>   action 1.02 regexp ".+CRC" $_cli_result var
>   action 1.03 puts "match is $var"

Sorry, I must have been sleepy. There is no implicit start anchor, I
just mistyped when testing. Without whitespace, not using a submatch:

 action 1.02 regexp "[^ ].+CRC" $_cli_result var

-- 
Peter

_______________________________________________
cisco-nsp mailing list  [email protected]
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/

Reply via email to