How do I find possible matches using regular expression?

2006-11-23 Thread Andy
Hi there, I'm trying to do some predicting work over user input, here's my question: 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

Re: How do I find possible matches using regular expression?

2006-11-23 Thread Paul McGuire
Andy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi there, I'm trying to do some predicting work over user input, here's my question: 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

Re: How do I find possible matches using regular expression?

2006-11-23 Thread Andy
The problem is the input will be much more complex than the example, it could be something like 30 minutes later where any string starting with a number is a possible match. Paul McGuire 寫道: Andy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi there, I'm trying to do some

Re: How do I find possible matches using regular expression?

2006-11-23 Thread Fredrik Lundh
Andy wrote: The problem is the input will be much more complex than the example, it could be something like 30 minutes later where any string starting with a number is a possible match. so if I type 1, are you going to suggest all possible numbers that start with that digit? doesn't strike

Re: How do I find possible matches using regular expression?

2006-11-23 Thread John Machin
Andy wrote: Hi there, I'm trying to do some predicting work over user input, here's my question: 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

Re: How do I find possible matches using regular expression?

2006-11-23 Thread Peter Otten
Andy wrote: I'm trying to do some predicting work over user input, here's my question: 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? The

Re: How do I find possible matches using regular expression?

2006-11-23 Thread Andy
OK, here's what I want... I'm doing a auto-tasking tool in which user can specify the execution rule by inputting English instead of a complex GUI interface(Normally a combination of many controls). This way is way better user interaction. So the problem comes down to understanding user input

Re: How do I find possible matches using regular expression?

2006-11-23 Thread Andy
The seems good to me, I'll try it out, thanks for the posting. Peter Otten 写道: Andy wrote: I'm trying to do some predicting work over user input, here's my question: for pattern r'match me', the string 'no' will definitely fail to match, but 'ma' still has a chance if user keep on

Re: How do I find possible matches using regular expression?

2006-11-23 Thread Andy
This works well as a checking strategy, but what I want is a suggesting list... Maybe what I want is not practical at all? Thanks anyway Peter. Andy Wu Andy ��道: The seems good to me, I'll try it out, thanks for the posting. Peter Otten 写道: Andy wrote: I'm trying to do some

Re: How do I find possible matches using regular expression?

2006-11-23 Thread Peter Otten
Andy wrote: This works well as a checking strategy, but what I want is a suggesting list... Indeed, I was grossly misreading your question. Peter -- http://mail.python.org/mailman/listinfo/python-list