I tried this but it doesn\'t work :
[^\\s-]
Any Ideas?
Try [^- ], \s will match 5 other characters beside the space (like tab, newline, formfeed, carriage return).
[^- ]
\s