Say I have a string and within that string are multiple occurrences of a string similar to "@41|8:00|10/01/2015@".
What I need to do is find each of these strings and remove everything between the two "|" so "@41|8:00|10/01/2015@" needs to become "@41|10/01/2015@".
I can find and replace the entire string with
preg_replace('/@[^>]*@/', 'replaced', $teststr);
but how do I find a replace only that center portion?
I just cannot get my head around the expression...