On 06Jan2017 11:37, Joaquin Alzola <joaquin.alz...@lebara.com> wrote:
Iranna Mathapati <iranna.gan...@gmail.com> asked:
How to match latter(caps and small) ,numbers and # symbol in python pexpect.
With a .*
Ugh. Please not. Expect() accepts a nongreedy regular expression. ".*" is the
lazy "match absolutely anything" pattern. Generally overused and imprecise.
Iranna Mathapati knows what to look for.
See the documentation for the re module, specificly the regular expression
syntax:
https://docs.python.org/3/library/re.html#regular-expression-syntax
To match letters, digits and "#", try:
[0-9a-zA-Z#]*
Cheers,
Cameron Simpson <c...@zip.com.au>
--
https://mail.python.org/mailman/listinfo/python-list