05-31-2013 06:25 AM - edited 03-16-2019 05:38 PM
in my script I need to do this:
11-digit receipt via telephone
xxxxxxxxxxx
and I need to pass the query in this format
xxx-xxxxxxx-x
where x is a number from 0 to 9
in jave like?
Solved! Go to Solution.
05-31-2013 06:54 AM
Hi,
next time you'd have more luck in the Contact Center section of the forum
Try this: if the original 11 digit phone number is stored in the variable s, then insert a Set step with the following value:
s.replaceAll("(...)(.......)(.)","$1-$2-$3")
so if s = '12345678901', the result would be '123-4567890-1'
G.
05-31-2013 06:54 AM
Hi,
next time you'd have more luck in the Contact Center section of the forum
Try this: if the original 11 digit phone number is stored in the variable s, then insert a Set step with the following value:
s.replaceAll("(...)(.......)(.)","$1-$2-$3")
so if s = '12345678901', the result would be '123-4567890-1'
G.
05-31-2013 07:08 AM
thanks..
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: