I am relatively new to regular expressions. I just wanted to know that how to replace empty spaces or carriage return ( new line ) through preg_replace in php for this string:
[someshortcode]
[someshortcode]
The string has ] at the end of one line and [ at the new line. I want to remove any spaces/ characters be it '\r' ,'\t', '\n', empty spaces or any other character
output should be like this: [someshortcode][someshortcode]
Thanks