If I have the following string for example:
"Value1 *|VALUE_2|* Value3"
I want to be able to remove any substrings from within the string that begins with the chracters | and end in |. I will not know what will be between these characters but this is irrelevant as I want to remove whatever is between them.
Basically, I am just unsure of what pattern to use in the code below.
preg_replace("*|PATTERN|*", "", $str);