Last answered:

21 Oct 2024

Posted on:

16 Oct 2024

0

How did it match london_bridge.gif?

london_bridge contains an underscore. Does alphanumeric(\w) also match underscore?
2 answers ( 0 marked as helpful)
Instructor
Posted on:

18 Oct 2024

1
Hey Viraj,
Thank you for reaching out!
Yes, in Python's regular expressions, the \w character class matches alphanumeric characters as well as the underscore (_). This means that \w will match any letter (A-Z, a-z), any digit (0-9), and the underscore.
Kind regards,
365 Hristina
Posted on:

21 Oct 2024

0
Thank you Hristina

Submit an answer