I have a text like this:
...<span>my name is bob and I live in </p><p>America</span>...
I would replace this text in
...<span>my name is bob and I live in </span></p><p><span>America</span>...
I know the replace() function, but I don't know well regular expressions, how it's possible to do this?
Keep in mind that is possible to have other span tags correctly closed before the </p>
, for example:
...<span>my name is bob</span> and <span>I live in </p><p>America</span>...