http://qs321.pair.com?node_id=11143477


in reply to Re: Unable to constrain the effect of a negative lookahead
in thread Unable to constrain the effect of a negative lookahead

Hi Polyglot,

That's a brilliant approach. I had not thought about setting the /e regex qualifier and then putting code to be executed in the regex upon the finding of a match. That certainly opens the door to a broad span of possibilities. I had gone with the approach of splitting $SYSPBUFF into two parts one before and one beginning with the first presence of "batch =". The /e regex qualifier approach has much appeal in that with the (?=batch\s*=) lookahead it already automatically does that splitting on the fly while preserving the value of $SYSPBUFF other than for the specific subpatterns being sought. I will try creating a new version of my real world project code using the approach you've put forth.

fireblood

P.S.Just out of curiosity, how many languages do you speak and what are they? I'm a native speaker of US English and a tiny fraction of Cherokee, and also took courses in German, Chinese, Hebrew, and Vietnamese in high school and college. Each language studying experience not only provides access to the language, but also to the music, food, dress, customs, and other aspects of others' cultures. I think that people who are polyglottal are also polycultural.

Cheers!