I need a regexp to split a string by commas and/or spaces, but ignore hyphenated words -- what's the best way to do this?
so, for example -- I'd like this ...
"foo bar, zap-foo, baz".split(/[\s]+/)
to return
["foo", "bar", "zap-foo", "baz"]
but when I do that it includes the commas like this ...
["foo", "bar,", "zap-foo,", "baz"]