$s = 'This, is, an, example. Keep $2.50, 1,500, and 192.168.1.1.'; $re_revdiablo = qr[(?:[^\w\'\$!,.-]+|(?:(?<=\D)[.,])|(?:[.,](?=\D|$)))+]; print join ' | ', split $re_revdiablo, $s; This | is | an | example | Keep | $2.50 | 1,500 | and | 192.168.1.1 #### $re_revdiablo = qr[ (?: # group, no capture [^\w\'\$!,.-] # on anything not in your list | (?: (?<= \D ) [.,] ) # or . or, if preceded by a non numeric | (?: [.,] (?= \D | $) # or . or, if followed by a non numeric or EOL ) )+ # 1 or more ]x;