Welcome to the Monastery | |
PerlMonks |
Re: Re: Regexes on Streams - Revisited!by tsee (Curate) |
on Oct 14, 2003 at 17:11 UTC ( [id://299190]=note: print w/replies, xml ) | Need Help?? |
Yes, the bug I mentioned is related to that. Anyhow, die-ing out of the regex caused my perl to dump core (win32 multithread 5.6.1 -- ActivePerl), so that's not an option. Incrementing a lexical variable $end_of_stream worked only in *some* cases. Printing something from the (${}) construct worked okay, but the incrementing action-at-a-distance did not work every time. Thus the use of a package variable. Back to that bug. The (?!) construct causes the current branch of the match to fail. That's nice but, as far as I can tell, entirely uneffective as this are because of the | at the end of the inserted end-of-string-tracking regex group. Instead, one'd want to modify the inserted regular expression to quit trying to match once the code construct is reached. (Ideally, it'd just fail which would make the whole experimental code construct unnecessary.) Unfortunately, I'm currently not able to spend much time on finding such a regex. (Read: almost none, I have to continue studying now.) Steffen
In Section
Meditations
|
|