Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: help required for regexp

by sumeetgrover (Scribe)
on Dec 07, 2011 at 15:55 UTC ( #942274=note: print w/replies, xml ) Need Help??


in reply to help required for regexp

The first part of your regular expression would only match:
f3333
And therefore replace 3333 with 1. Also, you haven't mentioned the %labels hash but used it in regexp.

Your regexp can be made more specific and changed to:
 $formula=~s/([0-9]{4})/$Hidlabels{$1}/g;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://942274]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2017-08-23 22:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (360 votes). Check out past polls.

    Notices?