The point that people sometimes miss about regular expressions is that you only need to write enough of it to match the bit of the test that you need. Therefore most of your regex is unnecessary. You can do it like this:

Code

$line =~ /(\d+\W\w)/;

And, as KevinR has pointed out, if it always appears at the end of the string you can add that information into the regex too.