As per this thread it's pretty easy to remove all digits from a string in PHP.
For example:
$no_digits = preg_replace('/\d/', '', 'This string contains digits! 1234');
But, I don't want digits removed that are part of HTML charactr codes such as:
)
©
How can I get Regex to ignore numbers that are part of a HTML character code? i.e. numbers that are sandwiched between &# and ; characters?
'~(?i:[&%](?:[a-z]+|(?:\#(?:[0-9]+|x[0-9a-f]+)));(*SKIP)(*FAIL)|\d+)~'