in reply to regular expression matching in expect
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).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: regular expression matching in expect
by cmastays (Initiate) on Aug 09, 2012 at 19:04 UTC | |
by zengargoyle (Deacon) on Aug 10, 2012 at 11:31 UTC | |
by aitap (Curate) on Aug 09, 2012 at 20:27 UTC | |
by cmastays (Initiate) on Aug 09, 2012 at 23:05 UTC | |
by aitap (Curate) on Aug 10, 2012 at 07:26 UTC |