<p>I am trying to validate user id's matching the example:</p>

<pre><code>smith.jack or smith.jack.s
</code></pre>

<p>In other words, any number of non-whitespace characters (except dot), followed by exactly one dot, followed by any number of non-whitespace characters (except dot), optionally followed by exactly one dot followed by any number of non-whitespace characters (except dot).  I have come up with several variations that work fine except for allowing consecutive dots!  For example, the following Regex</p>

<pre><code>^([\S][^.]*[.]{1}[\S][^.]*|[\S][^.]*[.]{1}[\S][^.]*[.]{1}[\S][^.]*)$
</code></pre>

<p>matches "smith.jack" and "smith.jack.s" but also matches "smith..jack" "smith..jack.s" !  My gosh, it even likes a dot as a first character.  It seems like it would be so simple to code, but it isn't.  I am using .NET, btw.</p>

<p>Frustrating.</p>

```
```
[^\s.]+\.[^\s.]+(\.[^\s.]+)?
```
```
BTW what you asked for allows "." and ".."