Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Silly RegEx problem

by Wonko the sane (Deacon)
on Feb 19, 2004 at 18:44 UTC ( #330311=note: print w/ replies, xml ) Need Help??


in reply to Silly RegEx problem

Doesn't look like you are capturing the part you are trying to print. No capturing parens.
The first regex, also does not match your input.

This would give you what you say you want.

my $one = $1 if /^(\{\w+\s+\d+\})/;

Wonko


Comment on Re: Silly RegEx problem
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2015-07-29 08:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (261 votes), past polls