> > /([0-9]*)([^\+\- ]+)(.*)/ should work - note the escaped dash. > > Rubbish. In character ranges, \ is not special. A rubbish upon your rubbish. \ are special pretty much anywhere. Otherwise how would you match all chars except a ']' ? irb(main):007:0> /([0-9]*)([^\+\- ]+)(.*)/.match('44dads')[0..-1] => ["44dads", "44", "dads", ""] irb(main):008:0> /([0-9]*)([^\+\- ]+)(.*)/.match('44-dads')[0..-1] => ["44-dads", "4", "4", "-dads"] irb(main):009:0> /([0-9]*)([^\+- ]+)(.*)/.match('44-dads')[0..-1] SyntaxError: compile error (irb):9: invalid regular expression: /([0-9]*)([^\+- ]+)(.*)/ from (irb):9 irb(main):010:0> /([0-9]*)([^\+\- ]+)(.*)/.match('44\\dads')[0..-1] => ["44\\dads", "44", "\\dads", ""]