To others who have answered this question, it's important to note that some applications would require a slightly different regex, depending on how escape characters work in the program you're writing. If you were writing a shell, for example, and wanted to have command separated by spaces and other special characters, you would have to modify your regex to only include words with special characters if those characters are escaped.
So, for example, a valid path would be
/usr/bin/program\ with\ space
as opposed to
/usr/bin/program with space
which would refer to "/usr/bin/program" with arguments "with" and "space"
A regex for the above example could be "([^\0 ]\|\\ )*"
The regex that I've been working on is (newline separated for 'readability'):
"\( # Either
[^\0 !$`&*()+] # A normal (non-special) character
\| # Or
\\\(\ |\!|\$|\`|\&|\*|\(|\)|\+\) # An escaped special character
\)\+" # Repeated >= 1 times
Which translates to
"\([^\0 !$`&*()+]\|\\\(\ |\!|\$|\`|\&|\*|\(|\)|\+\)\)\+"
Creating your own specific regex should be relatively simple, as well.