Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Help with regex - find captured pattern twice

by pachydermic (Beadle)
on Apr 11, 2013 at 13:52 UTC ( #1028161=note: print w/ replies, xml ) Need Help??


in reply to Re: Help with regex - find captured pattern twice
in thread Help with regex - find captured pattern twice

Wow. What the heck is that monstrosity?! Well done.

Would you mind explaining that regex? I think that \pL references a unicode character class (from this page: http://perldoc.perl.org/perlrecharclass.html) but I'm still kind of baffled by what's going on...
  • Comment on Re^2: Help with regex - find captured pattern twice

Replies are listed 'Best First'.
Re^3: Help with regex - find captured pattern twice
by hbm (Hermit) on Apr 12, 2013 at 03:11 UTC

    You might read it as this:

    s/ (?<! # 2. NOT preceded by \pL # a letter ) ( # 1. Capture \pL # a letter ) ( # 3. Capture \( # open paren; [\d+-]+ # one or more digits, plus, minus; \) # close paren )? # (Zero or one time) (?! # 4. NOT followed by \pL # a letter ) /(${1}SS*exp($1$2))/gx;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1028161]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2016-06-26 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (331 votes). Check out past polls.