Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Quick question on matching

by c-era (Curate)
on May 21, 2002 at 16:45 UTC ( #168186=note: print w/ replies, xml ) Need Help??


in reply to Quick question on matching

You can use a reference, place parens around the part you want, and use $1 to access that part of the regex. If you have more then one set of parens, you would use $2 to access the second one, $3 to access the third, etc.

if (/\b(API|APIN|UWI)\s*\./) { somesub($1); }


Comment on Re: Quick question on matching
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2016-02-13 12:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (429 votes), past polls