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

Re: regex question: How do I modify in place in only one character class?

by wind (Priest)
on Jul 01, 2014 at 01:10 UTC ( #1091785=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $selection =~ s/<option [^>]*\K(?=>\s*\Q$value\E\b)/ selected/;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2023-03-30 10:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (74 votes). Check out past polls.

    Notices?