JustPaste.it
 # Refactored and Formatted using  https://regexformat.com/ 
# ^(?:\s*|\w{6})$
     

     ^ 
     (?: \s* | \w{6} )
     $