Reputation: 1
I'm trying to expect for different type of network devices but I can't make a more complex regular expression work.
For Cisco devices I have :
expect {"*>"}
The * works fine
But for Fortinet devices I want to do this
expect {"^[a-zA-Z0-9_.-\s]+[#]"}
and it doesn't work. I checked on a REGEX "checker" to make sure the expression is right and it seems to work. So Basically, I want to filter for lines that start with "NAME_OF_DEVICE #" because this is how Fortinet shell is when you first connect to it
Any idea why it won't work?
Upvotes: 0
Views: 639