How to strip a string of everything but numbers and the letter x
(if it exists) with regex in Perl?
2x4 works
x3405 does not work
2 works
Trying to do the top rated answer but I have no idea.
This as far as I can get without screwing it up:
$string =~ s/[\D]//gi;
Or am I headed in the wrong direction?