[ale] expect script question
Fletch
fletch at phydeaux.org
Fri Aug 24 10:30:33 EDT 2001
>>>>> "Yong" == Yong Wang <yongwang at mindspring.com> writes:
Yong> Thanks to all who responded to my email. To escape +, it
Yong> take "\\+", which is a bit surprising. This is not the
Yong> regular expression I am used to. In sed, this can be done:
Yong> echo "+OK 0 0" | sed -e 's/\+OK \([0-9]*\)
Yong> \([0-9]*\)/\1:\2/'
It's the same regular expressions, it's a different quoting
mechanism. You've got to double the \ inside the ""'s to get the
backslash itself into the string. "\+" is simply `+'. The same thing
would happen in the shell if you used double quotes there rather than
single quotes.
--
Fletch | "If you find my answers frightening, __`'/|
fletch at phydeaux.org | Vincent, you should cease askin' \ o.O'
770 933-0600 x211(w) | scary questions." -- Jules =(___)=
| U
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list