File: Data.xml
111-111-1111
(111) 111-1111
111.111.1111
111-111-1111
+11 111-1111
File: Transform.xslt
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
regex="([0-9]{{3}})(-|\.)([0-9]{{3}})(-|\.)([0-9]{{4}})">
+1 (
)
-
Unrecognized phone number:
Output:
+1 (111) 111-1111
Unrecognized phone number: (111) 111-1111
+1 (111) 111-1111
+1 (111) 111-1111
Unrecognized phone number: +11 111-1111