Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^6: You won't believe what this regular expression does!

by LanX (Sage)
on Feb 26, 2021 at 13:17 UTC ( #11128831=note: print w/replies, xml ) Need Help??


in reply to Re^5: You won't believe what this regular expression does!
in thread You won't believe what this regular expression does!

> No, the intent is to ensure that the string ends in just one o, no less, no more than one.

And how did you solve it in the end?

...

You won't believe how I did this!

;-P

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^7: You won't believe what this regular expression does!
by salva (Canon) on Feb 26, 2021 at 14:23 UTC
    "hello\nhell\nhelloooo\nhello" =~ s/o+$//gmr =~ s/$/o/gmr

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2022-07-06 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?