Flow designer script using regex

Nisha30
Kilo Sage

Hi,

need help how to extract the string (left or right) of the character such as / the source is  data what we see in Data on our flow designer and we need to extract string from it.

example under Action :

we need script to extract the string LEFT of "/" such as admin/cmdb

Result should give admin since it is left to /

Thanks,

1 REPLY 1

Valmik Patil1
Kilo Sage

Hello,

 

You can use split function instead of regex

Please refer below script and try running it in background 

You can use it if your input string format is same every time

 

var text = "admin/cmdb";
var myArray = text.split("/");
gs.print(myArray[0]);

Thanks,

Valmik