Q:

what do '\r?\n\r?\n[\-\w+\.]+[>#]$' AND '\r\n][\-\w+\.]+(?:\([^\)]+\))?[>#] ?$' do?

I've put some hours in learning what this Regex do in Exscript module, but I just could not figure it out.
This module ios.py if for handling the prompt in Cisco equipment . 
_password_re     = [re.compile(r'[\r\n]Password:$')]

_first_prompt_re = re.compile(r'\r?\n\r?\n[\-\w+\.]+[>#]$')

_prompt_re       = [re.compile(r'[\r\n][\-\w+\.]+(?:\([^\)]+\))?[>#] ?$')]

Could anyone help me on this one ?
thank you very much

A:

Try to use Debuggex to visulize the regex:
\r?\n\r?\n[\-\w+\.]+[>#]$

Debuggex Demo
[\r\n][\-\w+\.]+(?:\([^\)]+\))?[>#] ?$

Debuggex Demo

