cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
308
Views
0
Helpful
2
Replies

uccx scripts

francis-garcia
Level 1
Level 1

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?

1 Accepted Solution

Accepted Solutions

Gergely Szabo
VIP Alumni
VIP Alumni

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.

View solution in original post

2 Replies 2

Gergely Szabo
VIP Alumni
VIP Alumni

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.

thanks..

Getting Started

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: