Figuring out how to implement a design in (cencered), I found the System.Text.RegularExpressions type in the .NET library that offers "full regular expression support". Upon (eventually) finding the regex language specification (you think it would be cross-referenced from the class), I noticed that it was exactly like Perl 5 regex's. I noticed that the escape codes were familiar, even the more exotic \A, \Z, and \G; and the replacement string took $digit or ${name} for captured groups, while the pattern string took \digit. Then I came upon the lazy-match quantifiers and I knew this had to be taken as-is from Perl. It even has the (?>...) stuff and a x option.

So... does this incorporate the actual Perl 5 source code, or was it written from scratch using the Perl 5 docs as a design spec?

More importantly, has anyone made a comparison in detail on how they differ? Rather than wading though the docs for a system I already know, it would be handy to just have a short list of what's different about it. Also, that's bound to be the confusing and surprising part.

After wading through this half-thought-through language, seeing mature Perl regular expressions as-is is like a breath of fresh air.

I wonder if our regex skills will get tapped by a new user base now? Nah, the feature will be pretty much ignored in favor of more brute-force way of accomplishing a problem.

—John


In reply to Microsoft's .NET ate a piece of Perl 5? by John M. Dlugosz

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.