Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Parsing and translating Perl Regexes

by sundialsvc4 (Abbot)
on Nov 05, 2013 at 01:42 UTC ( #1061223=note: print w/replies, xml ) Need Help??

in reply to Parsing and translating Perl Regexes

Pardon me for perhaps being stupid here ... but ... what exclusive right does «the Perl language» (tah, dahhh...!) have to “the same interpretation of RE-syntax that «the Perl language» does?”

Perl is (just ...) “a programming language,” and, as such, its underlying implementation of “regular expressions” most-certainly is not unique.   In fact, a great many (other...) languages “rather go out of their way” to implement “Perl-compatible” versions of it.

So ... prithee ... “down-vote away,” I still really want to know ... what exactly is The Problem Here?

If you (merely ...) “want access to a ‘Perl-compatible™ Regex’ from ...” any of the aforesaid languages, then you certainly can do so without resorting to “Perl-language mechinations!”

  • Comment on Re: Parsing and translating Perl Regexes

Replies are listed 'Best First'.
Re^2: Parsing and translating Perl Regexes
by LanX (Bishop) on Nov 05, 2013 at 02:00 UTC
    Despite the name is PCRE ... not compatible , I recommend here reading Friedl's book about Mastering Regular Expressions.

    JS' RegEx is based on Perl4, so plenty of things must be excluded.

    eLISP RegEx predates Perl (i.e. old POSIX), many escapes are inverted - e.g. \( <-> ( - and since regexes are always strings, any slash must be additionally escaped from string interpolation (leading to so called "slasheritis")

    Hope the last 2 phrases were still readable for you.

    Cheers Rolf

    ( addicted to the Perl Programming Language)

      What people name REGEX comes in 3 main dialects:

      • POSIX basic
      • POSIX extended
      • Perl

      The above also have dialect/implementation variants.

      And there are the different REGEX-notations used in other sciences like linguistics, which Friedl AFAIR does not include in his book.

      Helmut Wollmersdorfer
Re^2: Parsing and translating Perl Regexes
by Anonymous Monk on Nov 05, 2013 at 01:48 UTC

    ... what exactly is The Problem Here? ...

    Too many italics

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1061223]
[Corion]: Discipulus: Ouch ... staff cuts are never good, but having to hunt for work isn't great either, especially with a family...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2018-05-23 21:23 GMT
Find Nodes?
    Voting Booth?