$dataEntry =~ m{ \A # beginning of string \+? # optional plus sign \d+ # one or more digits \z # end of string }xms