in reply to \s and non-breaking spaces
use feature "unicode_strings" (>=v5.14) may help with that:
use feature "unicode_strings"; my $name = "foo\xa0x\xa03"; $name =~ s/\sx\s\d+//; say $name; # "foo" [download]