This is a regex expression you can use to filter a variable (let’s say a number), from all unwanted chars and sybols. Below is an example of how to use it with the Regex.Replace method:
[A-Za-z;'%^!@#$%&*()_+-] result = Regex.Replace(value,"[A-Za-z;'%^!@#$%&*()_+-]", String.Empty)
Advertisement
The question is,… “How to apply this code on my wp theme”?
I wanna replace “#” on my post title. Can use it? If so,… how to apply this code on wp theme?