[Python] How to neglect a backslash of the text while using regular expression re.search in...

Discussão em 'Python' iniciado por Stack, Fevereiro 5, 2025.

  1. Stack

    Stack Membro Participativo

    import re
    a = "apple\c"
    b = "applec"

    re.search(pattern, a)
    re.search(pattern, b)


    while searching the pattern. In example ".+" for Any char one or more reptitions. Here I want to neglect "\" when ".+" identify "\" character in search.

    Continue reading...

Compartilhe esta Página