Build, test, and debug regular expressions
Matches a root shell prompt in the format [user@host]# at the end of a line, with optional surrounding whitespace. The bracketed portion captures a user@hostname pattern typical of customized PS1 prompts or appliance CLIs (such as RSA devices), where the trailing # signifies root-level access. Useful for expect scripts, terminal automation, and detecting when a root command prompt is ready for input.