in reply to Re^3: Reg expression to replace URLs with Anchor tags in Tweets
in thread Reg expression to replace URLs with Anchor tags in Tweets

Ok. I get it. No more Perl regex questions on Perl monks. Is it really so awful that I can use the same regex in PHP as in Perl?

Sorry to have made everyone so angry.
  • Comment on Re^4: Reg expression to replace URLs with Anchor tags in Tweets

Replies are listed 'Best First'.
Re^5: Reg expression to replace URLs with Anchor tags in Tweets
by Anonymous Monk on Apr 19, 2009 at 03:22 UTC
    Why can't you go to cpan and copy the regex?
Re^5: Reg expression to replace URLs with Anchor tags in Tweets
by merlyn (Sage) on Apr 19, 2009 at 06:20 UTC
    Because PHP has PHP regex, not Perl regex. This site is perlmonks, about Perl, not PHP. Go visit phpmonks.org :)

    -- Randal L. Schwartz, Perl hacker

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

      Actually preg_replace in PHP uses Perl regex.

      I decided to post my question here because Perl Monks have been so great at helping me in the past.

      I really was just trying to figure out a Perl regex, so sorry to have upset so many Monks. Next time I won't mention that the Perl knowledge I acquire here can be used by any other programming languages, or that any programming languages even exist.

      Thanks everyone.
        Actually preg_replace in PHP uses Perl regex.
        No, it doesn't. It really doesn't. It might use "PCRE", which despite the name, is not Perl, nor even very Perl Compatible.

        This is why you're getting pushback. You are operating from a false claim.

        -- Randal L. Schwartz, Perl hacker

        The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.