Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: can regex contains function?

by choroba (Archbishop)
on Jun 19, 2020 at 07:49 UTC ( #11118257=note: print w/replies, xml ) Need Help??


in reply to can regex contains function?

> can regex contains function?

Yes, it can. That's what /e is for.

$t =~ s/(?<=\s)(.)/uc $1/ge;

But you don't need it here:

$t =~ s/(?<=\s)(.)/\U$1/g;

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2020-08-05 04:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (35 votes). Check out past polls.

    Notices?