Flow designer script using regex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-11-2022 12:43 AM - edited ā11-11-2022 12:47 AM
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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-11-2022 12:57 AM
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