Matching Anything But a Newline

  • + 0 comments

    regex_pattern = r'^.{3}..{3}..{3}..{3}$'

    we need to use ^ at the start and $ at the end as we search for exact match in the entire test_string

    test_string must be in the required format and there is only one occurence of the required string we are searching for.

    I hope I explain it well