I have a problem! I wanna detect any numbers in HTML content without numbers in tag attributes, I wanna change this numbers to other character then only numbers not in HTML TAG ATTRIBUTES that match with this REGEX.
Example:
Hi 3456; <a href="?id=4456">your code: 345</a>
Matched
3456, 345
Not Matched
4456
Thanks from all
You should best use a parser like PHP Simple HTML DOM Parser. The reasons are outlined in this blog post.