How can I use PHP to filter the metacharacters contained in the input content? how can I use PHP to filter the metacharacters contained in the input content? solution ------------------ what metacharacters need to be filtered for example? +, $ Str ------ solution -------------------- the seller is very good at this. Let's help you. What functions do you want to implement? Regular expression () GREEDY. * not greedy .*? How to use PHP to filter metacharacters in the input content
How to use PHP to filter the metacharacters contained in the input content
------ Solution --------------------
Which metacharacters need to be filtered using \ for example '/\? +/', $ Str
------ Solution --------------------
He is very good at this. Let's help you.
What functions do you want to implement?
Regular expression
()
Greedy .*
Not greedy .*?
Security u
Case Sensitive I
Search with preg_match (regular expression, Target, and result is still an array)
Replace with preg_replace (regular, Target, source)