I use re.findall(p, text)
to match a pattern generally, but now I came across a question:
I just want p
to be matched as a normal string, not regex.
For example: p may contain '+' or '*', I don't want these characters have special meanings as in regex. In another word, I want p to be matched character by character.
In this case p
is unknown to me, so I can't add '\' into it to ignore special character.