Cameron Simpson cs at
Fri Jan 6 18:00:13 EST 2017

On 06Jan2017 11:37, Joaquin Alzola <Joaquin.Alzola at> wrote:
>Iranna Mathapati <iranna.gani28 at> 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 

To match letters, digits and "#", try:


Cameron Simpson <cs at>

More information about the Python-list mailing list