Regex to Exclude Double spaces

Posted by Ian on Stack Overflow See other posts from Stack Overflow or by Ian
Published on 2010-04-19T12:54:10Z Indexed on 2010/04/19 13:03 UTC
Read the original article Hit count: 285

Filed under:
|
|

Hi,

I am looking for a regular expression for c# asp.net 3.5 that will fail if there are ever any double spaces in a sentence or group of words.

the cat chased the dog = true
the  cat  chased  the dog = false (doubles spaces occur at random intervals)

thanks

© Stack Overflow or respective owner

Related posts about regex

Related posts about string