in reply to Re: Extracting part of a substring with one regex (with backreference?)
in thread Extracting part of a substring with one regex (with backreference?)

Thanks Samy_rio, but when I do

print "$1\n";
I get

outg +rabe

on my box.

?

loris


"It took Loris ten minutes to eat a satsuma . . . twenty minutes to get from one end of his branch to the other . . . and an hour to scratch his bottom. But Slow Loris didn't care. He had a secret . . ."

Replies are listed 'Best First'.
Re^3: Extracting part of a substring with one regex (with backreference?)
by japhy (Canon) on Oct 28, 2005 at 13:01 UTC
    Um, that's because you copied and paste the code as it appeared in your browser, and perlmonks.org defaults to wrapping code at 60 chars or so. Try the "d/l" (download code) link next time.

    Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
    How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart

      See this node.

      Thanks,

      loris


      "It took Loris ten minutes to eat a satsuma . . . twenty minutes to get from one end of his branch to the other . . . and an hour to scratch his bottom. But Slow Loris didn't care. He had a secret . . ."
Re^3: Extracting part of a substring with one regex (with backreference?)
by Util (Priest) on Oct 28, 2005 at 13:01 UTC
    I think that you have cut-and-pasted Samy_rio's code directly from the node, so you also copied the plus sign and embedded newline that the Perlmonks site added for code wrapping. Click the 'download' link, and you will see that his code is two lines, not three.

      Uh oh, more egg on face. Sorry.

      loris


      "It took Loris ten minutes to eat a satsuma . . . twenty minutes to get from one end of his branch to the other . . . and an hour to scratch his bottom. But Slow Loris didn't care. He had a secret . . ."