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..
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide