> I once brutalized Henry Spencer's engine into telling me when I was > on my way to a match. This was for a UI: I wanted to be able to say > that the input should only match this RE, and if they typed something > that broke the match, I could beep and disallow the character. > > I was just a greenhorn then, so it coredumped. But it's another use > for access to internal engine states and failure reasons. Good point. Perhaps, on failure, a regex could set $@ to indicate what the problem was: while (gui_getchar($nextchar)) { $input.$nextchar =~ m/$pattern/; if ($@ =~ /fail/) { beep } else { $input .= $nextchar } } Damian
- Exposing regexp engine & compiled regexp's Filipe Brandenburger
- Exposing regexp engine & compiled regexp's Filipe Brandenburger
- Re: Exposing regexp engine & compiled regex... Damian Conway
- Re: Exposing regexp engine & compiled r... Nathan Torkington
- Re: Exposing regexp engine & compiled re... Damian Conway
- Re: Exposing regexp engine & compile... Jarkko Hietaniemi
- Re: Exposing regexp engine & com... James Mastros
- Re: Exposing regexp engine &... Jarkko Hietaniemi
- Re: Exposing regexp engine & compiled regexp... Filipe Brandenburger
- Re: Exposing regexp engine & compiled regexp... Damian Conway
- Re: Exposing regexp engine & compiled re... Rick Delaney
- Re: Exposing regexp engine & compiled regexp... branden
- Re: Exposing regexp engine & compiled regexp... Damian Conway
- Re: Exposing regexp engine & compiled regexp... Filipe Brandenburger
- Re: Exposing regexp engine & compiled regexp... Damian Conway