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!


In reply to Re^2: Unable to constrain the effect of a negative lookahead by fireblood
in thread Unable to constrain the effect of a negative lookahead by fireblood

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.