From: Eric Luo Date: 2005-06-29T09:58:22+09:00 Subject: Re: Ask for help about Regexp ------=_Part_4855_4083229.1120006700004 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I want a GUI interface. when i give my input one by one. and I will get an= =20 error message if what I input is not compatible with my expected mask. I had tried to google the solution for this, but I find nothing.=20 Would you please to give me any solutuion or clue. Thanks On 6/28/05, Nikolai Weibull =20 wrote:=20 >=20 > Eric Luo wrote: >=20 > > I need to match my input dynamically by Regexp, For example: I want > > match to this regexp: mask =3D /\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? >=20 > 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 >=20 > -- > 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);} >=20 > ------=_Part_4855_4083229.1120006700004--