0
3 characters, out of which the last character is an exclamation mark. r" quot;
3 characters, out of which the last character is an exclamation mark. r"
quot;1 Resposta
0
import re
regx = re.compile("^.{3}!quot;)
# this will match four char string were last char is an exclamation mark (if I correctly guess your expect ^^)
"""
Anyway, 'r' as string prefix doesn't stand for 'regular expressio ' but for 'raw string' (ie: string wich avoid doesn't use char escaping). Confusion is due to raw strings are often used for regular expression source string as improving readability when too much char should be escaped... but that's not always needed ;)
https://www.journaldev.com/23598/JUMP_LINK__&&__python__&&__JUMP_LINK-raw-string
https://stackoverflow.com/a/30164723
"""