regex - PHP - Match two strings ignoring span tags -


i looking function matches string string b (ignoring span tags)

a) shopping <span>stylish</span> rugs area  b) shopping stylish rugs area 

function should return true if match found else false, in above case should return true.

thanks

you can use strip_tags() remove tags string.

$a  = 'shopping <span>stylish</span> rugs area'; $b = 'shopping stylish rugs area'; var_dump(strip_tags($a) == $b); // outputs true 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -