regular expression php doesn't accept (" | ' ) ,
here's my $pattern = '/(img|src)=("|')[^"'>]+/i';
How can I escape ("|')
problem.
regular expression php doesn't accept (" | ' ) ,
here's my $pattern = '/(img|src)=("|')[^"'>]+/i';
How can I escape ("|')
problem.
I think the problem comes for the quote ' inside the pattern. Your pattern is defined between single quotes so you've to escape the single quotes part of the pattern. Try this:
$pattern = '/(img|src)=("|\')[^"\'>]+/i';