From: Nikolai Weibull Date: 2005-06-29T00:09:01+09:00 Subject: Re: Ask for help about Regexp Eric Luo wrote: > I need to match my input dynamically by Regexp, For example: I want > match to this regexp: mask = /\d{10}tt\d{0, 5} then I give my input > byte by byte. And I want to be noticed at the first time when it is > impossible for me to match my input to the regexp mask. so if i input > 34789d, when I the input the character 'd', I will be noticed. > > I wonder if it's possible or not. if it is, how could I do that? Well, you can’t easily do that. You could write a regex that matches valid prefixes of the strings of the language of the final regex, but that can become quite complicated. You should probably rethink your algorithm, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}