I have the following regex
^[^\s-#]+\s?[^\s-#]*[^\s-#]{2,32}#[0-9]{4}$
Rules:
- format must be STRING#dddd , a string, followed by hashtag, followed by 4 digits
- the string cannot start or end with space or "-" or hashtag
- no double spaces
- the string must be between 2 and 32 chars long
The above regex works. The only rule i haven't managed to implement is the last one