How do I find possible matches using regular expression?
ptmcg at austin.rr._bogus_.com
Thu Nov 23 10:14:06 CET 2006
"Andy" <icetortoise at gmail.com> wrote in message
news:1164272307.978986.158810 at l39g2000cwd.googlegroups.com...
> Hi there,
> I'm trying to do some predicting work over user input, here's my
> for pattern r'match me', the string 'no' will definitely fail to match,
> but 'ma' still has a chance if user keep on inputting characters after
> 'ma', so how do I mark 'ma' as a possible match string?
> Thanks a lot,
Maybe .startsWith might be more useful than re.match, since you are
predicting user input based on characters that have been typed so far.
More information about the Python-list