-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regex for prompt parsing causing inconsistent results #317
Comments
So what I think needs to be done here is the default IOS regex prompt pattern (see A work around for now could be to just setup your own custom prompt patterns for IOS devices to ignore that particular string. https://www.regular-expressions.info/refcapture.html |
tl;dr: Regex for prompt parsing of output searches for
>
as end of the prompt. This causes an issue with command outputs that include>
, which causes trigger to think that this is a break for new output.Consider the output below:
khardson@hostname> show bgp neighbor 1.1.1.1 | match Flags Type: External State: Established Flags: <Sync RSync>
Here is the results that trigger got when running this command:
INFO:twisted:Got results: [' Type: External State: Established Flags: <Sync ', '{master}\r\n']
Notice that
RSync>
is not in the result, and that there are 2 results for one command.The logs shows that trigger thinks that
RSync>
is the prompt, causing it to think there is a non-existent second command's output after theRSync>
.Below are the full logs:
The text was updated successfully, but these errors were encountered: