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

"hello\nhell\nhelloooo\nhello" =~ s/o+$//gmr =~ s/$/o/gmr