Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: A challenging problem in perl regular expression

by Albannach (Monsignor)
on Jan 08, 2009 at 05:03 UTC ( [id://734806]=note: print w/replies, xml ) Need Help??


in reply to A challenging problem in perl regular expression

How about:
$_='JAZZxxJAZZJAZZxxJAZJAZZxxJAZZ'; print $_,$/; s/(.*?)(JAZZ)/('a'x length $1) . $2/ge; print
which gives:
JAZZxxJAZZJAZZxxJAZJAZZxxJAZZ JAZZaaJAZZJAZZaaaaaJAZZaaJAZZ

--
I'd like to be able to assign to an luser

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-19 19:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found