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