Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] Preg replace ??

Expand Messages
  • Shlomi Fish
    ... Also see the links at: http://perl-begin.org/topics/regular-expressions/ One should note that Perl has first-order syntax for regular expressions instead
    Message 1 of 4 , Apr 25, 2010
    • 0 Attachment
      On Sunday 25 Apr 2010 08:27:33 Charles K. Clarkson wrote:
      > Sarah Fox wrote:
      > : I'm familiar with the PHP version of preg_replace, but is this also
      > : a perl function aswell ?
      >
      > Yes. It is called substitution and is similar, but easier to write than
      > preg_replace. "preg" stands for perl regular expressions. Since you are
      > already in Perl, it would be redundant to include the preg prefix on
      > Perl function names.
      >
      > : I'm sure this is a standard perl function.
      >
      > s/// is described in the perlop manpage under the Regexp Quote-Like
      > Operators section.
      >

      Also see the links at:

      http://perl-begin.org/topics/regular-expressions/

      One should note that Perl has first-order syntax for regular expressions
      instead of PHP's regular-expressions-inside-delimiters-inside-strings. So you
      need to do less double backslashes (e.g: "\\(") and the syntax is more
      consistent.

      >
      > HTH,
      >
      > Charles Clarkson
      > --
      > Mobile Home Investor
      > Free Market Advocate
      > Programmer
      >
      > I'm not really a smart person. I just play one on the Internet.
      >

      :-)

      I once said that "I am not an actor. I just play one on T.V.":

      http://www.shlomifish.org/humour.html#not_an_actor

      Regards,

      Shlomi Fish

      --
      -----------------------------------------------------------------
      Shlomi Fish http://www.shlomifish.org/
      "Humanity" - Parody of Modern Life - http://shlom.in/humanity

      Deletionists delete Wikipedia articles that they consider lame.
      Chuck Norris deletes deletionists whom he considers lame.

      Please reply to list if it's a mailing list post - http://shlom.in/reply .
    • Sarah Fox
      ... From: Charles K. Clarkson ... s/// is described in the perlop manpage under the Regexp Quote-Like Operators section.
      Message 2 of 4 , Apr 25, 2010
      • 0 Attachment
        ----- Original Message ----
        From: Charles K. Clarkson <cclarkson@...>
        >>: I'm sure this is a standard perl function.

        s/// is described in the perlop manpage under the Regexp Quote-Like
        Operators section.
        <

        Ah, thank you.. - found it.
      Your message has been successfully submitted and would be delivered to recipients shortly.