Forum Moderators: coopster
i have strings which is valid when
{i}missing #1 tag {p}"p"{c}{product_price}{/c}{p}2000{/p}{/i}{/p}
but INVALID when
{i}missing #1 tag {p}"p"{c}{product_price}{/c}{p}2000{/p}{/i}
as p tag is missing for the first opening of opening p-tag. this can be true in opposite case when an OPENING p-tag is missing and closing tag is found.
how can i strip out such broken tags?
I cannot use something like
preg_match_all("/\{p\}(.*?)\{\/?p\}",$str,$matches);