My regex looks like this.
if (preg_match("/^[a-zA-Z0-9~@#$^*()_+=[\]{}|\\,.?: -]*$/", $text) == FALSE) {
echo 'Wrong!'
}
I want to allow special characters ' and " sign too. How should I better implement it? And whether it is a security break for mysql database.