Regular Expression to disallow two consecutive white spaces in the middle of a string [closed]
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I need a regex to meet the following requirements: Only letters, periods and whitespace are allowed. No white space at the beginning and at the end of the string. White space in the middle of the string is OK, but not two consecutive white spaces. Matches: "Hello world." "Hello World. This is ok." Not Matches: "