On 4/3/25 8:04 AM, Loren Wilton wrote:
Well, this is very strange and I don't know what is going on. I almost suspect some sort of bug in the regex processor in SA. replace_tag N1 (?:1|l|\xf0\x9d\x9f\x8f) replace_tag DIGIT (?:[0-9Ol]|\xf0\x9d\x9f[\x8e-\x97]) replace_rules OB_PHONE_TEST4 OB_PHONE_TEST5 OB_PHONE_TEST6 body OB_PHONE_TEST4 /\b(?:\+?\s?<N1>\s?)?\(?<DIGIT>{3}\)?[-\s]{0,3}<DIGIT>{3}[-\s]{0,3}\b/ body OB_PHONE_TEST5 /\b(?:\+?\s?<N1>\s?)?\(?<DIGIT>{3}\)?[\s-]{0,3}<DIGIT>{3}[\s-]{0,3}<DIGIT>{4}/ body OB_PHONE_TEST6 /\(?<DIGIT>{3}\)?[\s-]{0,3}<DIGIT>{3}[\s-]{0,3}<DIGIT>{4}/ Rules 4 and 6 match. Rule 5, which is the complete match, does not. I have no idea why. I was getting the same results using your rule form before I simplified things a bit. Partial overlapping matches work, a complete match does not. The complete match DOES work if the phone number is in ASCII. But not if any digit is unicode.
Actually OB_PHONE_TEST4 matches on "INV-854113" and OB_PHONE_TEST6 matches on "andr9202822840@caosusaoviet[.]vn", the regexps doesn't seem to work at all. Giovanni
OpenPGP_signature.asc
Description: OpenPGP digital signature