Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

RegEx Replace in Expressions

Avatar

Avatar
Validate 10
Level 2
eriku40433679
Level 2

Likes

10 likes

Total Posts

33 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 2
eriku40433679
Level 2

Likes

10 likes

Total Posts

33 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
eriku40433679
Level 2

07-08-2017

Hi all,

I need to clean up a varchar phone number of all non-numerical characters to compare against the SMS logs. I was wondering if there was a way to do so easily, maybe preprocessing or a computed field?

Thanks!

--Erik

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
MVP
Amit_Kumar
MVP

Likes

329 likes

Total Posts

649 posts

Correct Reply

231 solutions
Top badges earned
Validate 10
Validate 1
Establish
Give Back 50
Give Back 5
View profile

Avatar
Validate 10
MVP
Amit_Kumar
MVP

Likes

329 likes

Total Posts

649 posts

Correct Reply

231 solutions
Top badges earned
Validate 10
Validate 1
Establish
Give Back 50
Give Back 5
View profile
Amit_Kumar
MVP

20-08-2017

Hi Erik,

Adobe Campaign Javascript engine supports regular expression. You should use a like statement in select query and insert that in a new column, once you are satisfied. Update the old column with new values and delete the new column.

Regards,

Amit

Answers (5)

Answers (5)

Avatar

Avatar
Validate 10
Level 2
eriku40433679
Level 2

Likes

10 likes

Total Posts

33 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 2
eriku40433679
Level 2

Likes

10 likes

Total Posts

33 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
eriku40433679
Level 2

28-08-2017

Thanks Amit, Florent. We've gone the route of least resistance and had the ETL guys take care of cleaning up the data before we load it into campaign.

Going to try your suggestion when things calm down a bit.

Cheers!

--Erik

Avatar

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile
florentlb
Level 10

28-08-2017

Hi Erik,

Were you able to try what Amit suggested?

Let us know,

Florent

Avatar

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile
florentlb
Level 10

18-08-2017

Hi Erki,

I'm not quite the JS expert. Were you able to test it or do you need me to check with the teams?

Let me know,

Florent

Avatar

Avatar
Validate 10
Level 2
eriku40433679
Level 2

Likes

10 likes

Total Posts

33 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 2
eriku40433679
Level 2

Likes

10 likes

Total Posts

33 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
eriku40433679
Level 2

13-08-2017

Thanks Florent. If that's the case, maybe I can have a script read in the results of the query and have it write to a new column after processing, and use that for the comparison? Does the javascript engine used by AC have regular expressions implemented? Actually I'll make a quick check. hahaha!

Cheers!

--Erik

Avatar

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile
florentlb
Level 10

11-08-2017

Hi Erik,

I'm not sure that the easiest solution is to do it directly in Campaign. You may be able to do so with the different functions available from the expression editor, but I'd think, if this is a one time comparison, that it'd be easier to export the data you want to transform and perform the transformation/comparison from the file.

I'll double check with the team if there's an easy way I did not think of.

Florent.