I use regex to get multiple patterns from a given string. Here I will clearly explain to you.
$string = "about us";
$newtag = preg_replace("/ /", "_", $string);
print_r($newtag);
This is my code.
Here I find a space in the word and replace the space with a special character, what do I need, right?
Now I need a regex that gives me patterns like
about_us. about-us, aboutusas output, if I as input about us. Is it possible to do this. Please help me with this.
Thanks in advance!
user3011850
source
share