I need to find a regex that will match any string, at least 6 characters long, including only one space, but the space can’t be the first or the last character.
I tried many combinations of \S and \s but I am now stuck.
Any help?
I need to find a regex that will match any string, at least 6
Share
Including one or zero spaces:
If you meant that it must have a space then you should remove the
?in\s?. This will only work in a regex engine that supports positive lookaheads and recognizes the\sand\Ssequences. RegexPal