I am trying to match specific span-tags from an HTML source.
The lang-attribute and the inner HTML of the tag are used as parameters for a function which returns a new s
We'll never reapeat it again : do not use regular expressions to work with HTML !
Instead, use DOMDocument::loadHTML.
It'll allow you to manipulate your HTML data using the DOM, which is much more powerful and easier : you'll be able to :
Really : take the time to learn DOM : it's a great investment !