WhatsApp adds extra char after coping phone number

I’m using macOs 15.0.1, using WhatsApp client 2.24.20.79.
When you try to copy a phone number from receiver profile (by clicking on it), WhatsApp adds a special char after such number.

Such char is ‬‬[U+202C], which seems to be “an empty string

Be aware of this beacuse regex in JavaScript and PHP are not seeing this as a char, so you funcitons like this will not work:

function checkNumber(elem) {
    let floatRegex = /^((d+(.d *)?)|((d*.)?d+))$/;
    let error = 'error';
    elem.val(elem.val().replace(",", "."));
    if(!floatRegex.test(elem.val()) && elem.val() !== '') {
        elem.addClass(error);
    }
    else {
        elem.removeClass(error);
    }
}

Any suggestion about a regex that can include such char?

I’m looking for a regex to remove such char