I'm trying to match:
<image=1,righ t>
- or -
<image=1>
where the 1 and 'right' become parameters.
So far I have:
preg_match_all( '#<image=(.+?), (.+?)> | <image=([^>]+)#msi', $body,
$image_tags);
and
$image_count = preg_match_all( '#<image=([^>]+)#msi', $body, $image_tags);
I'm trying to see if I can get them both into the one regexep, I assume
I have to use an alternative | somewhere, just not sure where.
Can anyone help?
<image=1,righ t>
- or -
<image=1>
where the 1 and 'right' become parameters.
So far I have:
preg_match_all( '#<image=(.+?), (.+?)> | <image=([^>]+)#msi', $body,
$image_tags);
and
$image_count = preg_match_all( '#<image=([^>]+)#msi', $body, $image_tags);
I'm trying to see if I can get them both into the one regexep, I assume
I have to use an alternative | somewhere, just not sure where.
Can anyone help?
Comment