Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: I wonder...

by Jenda (Abbot)
on Jan 22, 2005 at 14:40 UTC ( [id://424233]=note: print w/replies, xml ) Need Help??


in reply to I wonder...
in thread Things you think you'll never use.

You mean something like:

$s = "xxyyyyyy"; $s =~ m/((x+)(??{'y' x length($2)}))/ and print "$1\n";
? :-)

Jenda
We'd like to help you learn to help yourself
Look around you, all you see are sympathetic eyes
Stroll around the grounds until you feel at home
   -- P. Simon in Mrs. Robinson

Replies are listed 'Best First'.
Re^2: I wonder...
by spurperl (Priest) on Jan 22, 2005 at 17:26 UTC
    Yes this is exactly what I meant :-) But it's not the point of my post. The point was: this matching task is a real challenge for 'normal regexes'. This technique using ??{} is indeed a way to solve it. I wondered whether there are other ways, using more standard regex operators.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-03-29 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found