AnsweredAssumed Answered

Mapping Javascript issue

Question asked by skamrani459678 on Aug 13, 2018
Latest reply on Aug 14, 2018 by Lee Sobotkin

I've encountered very strange issue.

I have a mapping function that removes any special characters from Name except "-" and "&".

The regex appears to be working fine outside boomi world

https://jsbin.com/tazohonixo/edit?js,console

 

But inside boomi, it appears to be stripping all special characters including "-". I've tried inline scripting as well as scripting component.

 

Here is what I am trying to do:

output = input.replace(/[^\w\s-&]/gi, "");

 

input = 'saagar%%%test'

output= 'saagartest'

 

input='saagar-test'

output='saagar-test'

 

 

Cheers

Outcomes