Hi,
Can anyone advise me how can i do the following
- read a block of text and replace any characters that is not (A-Z, a-z, 0-9, space) to another character such as *
Eg.
"This is a block of+ text to be> replace. Some<#> weird @characters% i want to remove"
to
"This is a block of text to be replace Some** weird characters i want to remove"
I've look into preg_replace, it can only replace a certain pattern.
i am not sure how to replace characters that is not in the pattern.
Such as [A-Za-z0-9] is valid, anything other then that replace to *
Please advise.