Device Prompts
3 mins
V6 ProV6 MSPV6 Core
Overview
It is essential for device prompts to be correct for efficient and correct use of rConfig. They basically tell rConfig when to stop sending commands to the device and start processing the output. If the prompt is incorrect, rConfig will not be able to process the output correctly and will not be able to determine when the output has finished. Incorrect prompts cause download delays or partial config output.
Since 6.9.6 REGEX support for device prompts has been enhanced. This allows for more complex prompts to be used. For example, if you have a device that has a prompt like this:
myrouter-location1#
you can use a regex like this (.*) to match any characters after the hostname and before the #. This would be entered into the device prompt field like this:
myrouter-.*#
other varitions of this prompt could be:
myrouter-location1#
1#
location1#
myrouter-.*#
Other examples of a prompt could be:
hostname(config)#
hostname(config-if)#
hostname(config-vlan)#
And these can be represented in the device prompt field like this:
hostname\(config.*\)#$
A more complex example could be:
hostname(config-if)#$
hostname(config-vlan)#$
hostname(config)#$
Which could be represented in the device prompt field like this:
hostname\(config(-if|-vlan)?\)#$
When entering REGEX prompts to either the Main Prompt field or the Enable Prompt field, you DO NOT need to add REGEX delimiter characters at the beginning and end of the string, but you should escape any special characters with a backslash.
You can test REGEX strings at regex101.com