Here is what I currently have, this will match alphanumerical characters and space:
^[a-z0-9\s]+$
What I would like to do is to ensure that there will only be a match if there is no more than one (1) space. The above will match "This is a test", but I would only want it to match if the input is "This isatest", or "T hisisatest". As soon as there is more than one space total it will no longer match.
Ideally it would also not match if the space is leading or trailing, but that's just icing.
EDIT: The idea is that this will be used to verify account names upon account creation. The account name may only contain a Latin letter, a number, and a single space. However, it could be all letters or all numbers, the space is not required. This is definitely about space and not whitespace.