to match root@ ~#Did you mean [root@hostname ~]#? Here is the regular expression to match it: qr/^\[root@\w*\s*~\]#/ (assuming that there can be a hostname after "@" and some kind of space character between the hostname and current directory).
In reply to Re: regular expression matching in expect
by aitap
in thread regular expression matching in expect
by cmastays
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |