Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Backref in a regex quantifier

by sfink (Deacon)
on Jul 11, 2007 at 03:31 UTC ( #625949=note: print w/ replies, xml ) Need Help??


in reply to Backref in a regex quantifier

No, backreferences are not allowed there. It could be implemented, but I don't think it comes up often enough to be needed.

However, if I can simplify your example even further and assume that the first (\d+?) is always of fixed length (say 4 characters), then the following will give you what you want:

unpack("a4/A*", $_)


Comment on Re: Backref in a regex quantifier
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2014-12-26 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls