I'm sorry to have confused you, but I was definitely not intending to imply that Java did better RE matching than Perl - I am certain, particularly after reading Mastering REs, that the opposite is true.

What I was trying to say (badly, apparently) was that the possessive quantifier + was a feature in the java RE engine which I liked better than its (?>) counterpart in Perl.

I hope that clears up any confusion you may have had. Thank you for your input, though, since I always like to see language comparisons (and find myself often treating Perl as the god of all languages).

update: Looking at this later, I realize that I have yet again said something other than what I mean, for which I feel greatly foolish.

The possessive quantifier +, is a feature which I see as potentially very convenient. The (?>) construct, for some simple cases, is less readable, IMHO, but cannot be ignored for more complex cases or the must-match-exactly-once case.

Didn't mean to imply any mine's-bigger-than-yours stuff, just a hey-lookit-this-nifty-feature thing.


In reply to Re: Re: Possessive Quantifiers by Ferret
in thread Possessive Quantifiers by Ferret

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.