Matching Whitespace & Non-Whitespace Character

Sort by

recency

|

126 Discussions

|

  • + 0 comments
    Regex_Pattern = r"(\S{2}\s){2}\S{2}"
    
  • + 0 comments
    Regex_Pattern = r"\S{2}\s\S{2}\s\S{2}"
    
    import re
    
    print(str(bool(re.search(Regex_Pattern, input()))).lower())
    
  • + 0 comments

    I hate to be so pedantic, but these task descriptions are pretty bad. For instance, would imply that every is the same non-whitespace character and every is the same whitespace character.

    The problem description should be written differently or come with some minimally-reproducible examples so we can infer what the challenge is really asking for.

  • + 0 comments

    r"(\S{2}\s){2}\S{2}"

  • + 0 comments

    got a working regex but I think I comlicated it ^(([\S][\s])([\S]{2}[\s])([\S]*))$