c:\@Work\Perl\monks>perl -wMstrict -le "my $s = '1ds rule: 22hn, 3rd and 123|sdnfloor'; ;; printf qq{'$&' } while $s =~ m{(\d+)([st|nd|rd|th])+}xmsg; " '1ds' '22hn' '3rd' '123|sdn' #### c:\@Work\Perl\monks>perl -wMstrict -le "my $rx_ordinal_indicator = qr{ (?