in reply to Re: Removing characters in a file name
in thread Removing characters in a file name

a sequence of digits surrounded by whitespace: /[A-Za-z0-9]+.*\b([0-9]+)\b/

No. That regex doesn't require whitespace anywhere.

The regex above thus excludes names that consist only of digits.

Since it's not anchored, it'll match anywhere in the filename, including its extension; only if you have files whose names are literally just digits, without an extension, it won't match. It'll also match two digits separated by a non-word (as well as non-whitespace) character.

WebPerl Regex Tester Link

Edit: Improved wording in second paragraph.