Excuse my ignorance but I really need help with this, I need this regex: [A-Za-z0-9]+\s?[A-Za-z0-9]+
(an username that allows a single whitespace in the middle, but not at the beginning or at the end.), but limiting the total amount of characters to minimum 3 and maximun 30.
I have tried to adapt this answer using negative lookaheads, but so far is not working.
It has to be a regex, it can't use jQuery or anything else.