My PHP code looks like :
preg_match_all("/\|\w+\|/s", $str, $pat_array1);
When I am using
str = 'For detail check this site |mysite|.'
I am getting output as :
Array
(
[0] => |mysite|
)
But when I am using forward slash or dot(.), I'm not getting the correct output. For Example if :
str = 'For detail check this site |mysite.com/parm1/parm2?val=1|.'
then my output is a blank array like:
Array
(
)
For this case I want to get output like
Array
(
[0] => |mysite.com/parm1/parm2?val=1|
)