trillianjedi - 9:12 pm on Jul 12, 2011 (gmt 0)
Can anyone help me with this PREG_REPLACE?
I'm trying to detect a SIP URI (kind of link an email address) which can be in what I'm parsing ending either with a ] or a ;.
So I need a reg-ex that will either/or for the square bracket or a semi-colon.
This is what I have so far:-
$line = preg_replace('#sip:(.*)\@(.*)\.(.*)[\];]#', "<span class=\"orange\">sip:$1@\\2.\\3</span>]", $line);
This doesn't break on the semi-colon as I intend, although it works on the close square bracket.