Hello, someone can kindly help me create a regex expression for the pattern below.
I have in my php code the following pattern: htmlspecialchars($str)
I need to create an expression that replaces this with this: htmlspecialchars($str,ENT_NOQUOTES,"UTF-8")
The expression should recognize the size of $str
and ignore it. In the end, I hope that texts like the one below have added to their end, the string: ENT_NOQUOTE,"UTF-8
.
For example: Where I have:
htmlspecialchars($table->content)
should look like this:
htmlspecialchars($table->content,ENT_NOQUOTES,"UTF-8")
Where I have:
htmlspecialchars($_POST['title'])
should look like this:
htmlspecialchars($_POST['title'],ENT_NOQUOTES,"UTF-8")