How can I make a style combining underlined text and non underlined spaces with Indesign cs5?
Thank you for helping.
Add a GREP style to the paragraph style you are using here. Set the text to match to
(meaning "all whitespaces"), and set the matching character style to your just-created "Not Underlined".
Why not simply set "underline off" in that GREP style? Because it would only work if the underline is applied in your paragraph style. Overriding the paragraph default, either entirely manual (a local override) or with a Character Style (the 'correct' way as far as I'm concerned) will always override a GREP style.
This assumes you used paragraph styles to format your text. If you did not, consider the advantages of doing so (where being able to casually switch off underlined spaces document-wide would count as one).
If you choose to not use paragraph styles, you must select your entire text and apply the GREP Style as a local override to everything.