I am trying to write some string replace functions, and rather than ask how to do a specific replace, I want to know more about modifiers so I can do it myself
Take this for example:
preg_replace('~[\W\s]~', ' ', $input);
or
strlen(preg_replace('![^A-Z]+!', '', $s));
What are those called? (~[\W\s]~) (![^A-Z]+!) They make very little sense to read or make up a new one. Where can I find all of them? Or learn how to write them?