http://www.perlmonks.org?node_id=1007353


in reply to Reg Ex exercise

I understand that your purpose here is practice in writting regular expressions. You probably have already noticed that numbers can be tricky. In production work, use a module Regexp::Common
Bill