Question: Problem
=======

Build a regex statement that allows the following:

1. minimum 5 characters
2. maximum 10 characters
3. can contain whitespace but whitespace does not increment character count
4. any non-whitespace characters increment character count

Test Cases:
-----------

```
 expected_to_pass = ['testa', ' test a', 12342, 1.234, 'test a']
 expected_to_fail = [' test', 'test ', ' test ', '     ', 1234, 0.1, '           ','12345678901']

```

Example regex statements and their purpose
------------------------------------------

**Allow 5-10 non-whitespace characters:**

```
[\S]{5,10}$

```

**Allow 5-10 characters regardless of whitespace:**

```
[\s\S]{5,10}$

```

I've been farting around with this for a few hours and cannot think of the best way to handle this.

Answer: 
How's this?

```
\s*(?:[\w\.]\s*){5,10}+$

```

Or:

```
\s*(?:[\w\.]\s*){5,10}$

```

Also, if ANY non-whitespace character goes:

```
\s*(?:\S\s*){5,10}$

```

You can test it [here](https://regex101.com/r/DsvRZY/3)
Check this out:
`(\s*?\w\s*?){5,10}$`

It won't match `1.234` because . is not included inside \w set

If you need it to be included then:
`(\s*?[\w|\.]\s*?){5,10}$`
`(\s*?[\w\.]\s*?){5,10}$`

Cheers