Answer the question
In order to leave comments, you need to log in
A regular that replaces forbidden characters?
octets 0-32 (0-20 hex), "\", """, "&", "<", ">", "[", "]", "^", "`", "{" , "|", "}", "~", octets 127-255 (7F-FF hex)
Answer the question
In order to leave comments, you need to log in
Just escape the slash and the closing bracket, paste the rest
[\x0-\x20\\"&<>[\]^`{|}~\x7F-\xFF]+
https://regex101.com/r/iutiMk/3
which replacesforced to dispel your misconception: regular expressions do not replace anything, they look for text. Replace functions like preg_replace()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question