sexpect
sexpect copied to clipboard
[v2.3.13] interact -subst PATTERN::REPLACE
interact <-subst|-sub> PATTERN::REPLACE
-nocasewould cause PATTERN to be case-insensitive-cstringimpacts both PATTERN and REPLACE- REPLACE can include
(0),(1), ...,(9)for RE match groups- For example,
-subst "(foo)(bar)::(0) (1) (2)"would changefoobartofoobar foo bar.
- For example,
-substcan be specified for at most 10 times.
For example, Dell iDRAC/racadm login looks like this:

With sexpect i -cstr -sub '(^|[\r\r])racadm>>::(1)(2)\e[1;35mracadm\e[1;34m> \e[m' it would become this:
