I have a php echo with regular expression as in
echo preg_replace("/(\[|\])/", '', $paramValue);
I also want to make sure that any spaces are replaced aka if we have hello / world it becomes hello/world
I am not good with regex
(\[|\]| )
echo preg_replace("/(\[|\]| )/", '', $paramValue);
Description
1st Capturing group (\[|\]| )
1st Alternative: \[
\[ matches the character [ literally
2nd Alternative: \]
\] matches the character ] literally
3rd Alternative:
matches the character literally