AnsweredAssumed Answered

Fetch a string using javascript Regular Expression in ITPAM

Question asked by ankgupta4 on Jul 14, 2017
Latest reply on Jul 19, 2017 by ankgupta4

Hi Team,

I have to fetch a string from a line having a unique defined pattern. I have used "match" function of Javascript Regular Expression and it is working in Javascript simulator but not working using ITPAM Javascript operator.

I am getting the following error Reason:

Failed to execute code:
var a = Process.data1;


var b = a.match(/\d{4}[\/]\d{2}[\/]\d{2}[\-][0-9]+/)


Process.data2= b;

-- msg.string.expected (#8)


data1 variable of Process contains: "Hi etc Hello 2017/01/04-123 Hello Hi etc ".


Kindly help me out to resolve this.