Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: can regex contains function?

by soonix (Canon)
on Jun 19, 2020 at 07:29 UTC ( #11118254=note: print w/replies, xml ) Need Help??

in reply to can regex contains function?

Yes you can, see perlretut and perlrequick.

However, for the special case of upcasing the first letter, there is the ucfirst function. Similiar matter has also been discussed here in the monastery: Capitalize the 1st letter of each word, see also in perlfaq 4: How do I capitalize all the words on one line?

Replies are listed 'Best First'.
Re^2: can regex contains function?
by toothedsword (Sexton) on Jun 19, 2020 at 07:44 UTC
    Thank you so much! Now I know how to solve this specific question. But do you know can I instert a function to the regex?

      If I understand your question, the first responder answered it: use the /e qualifier.

        Oh, sorry, I am so careless, Thank you so much!

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2021-10-17 19:30 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (72 votes). Check out past polls.