- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2022 09:58 AM
Hi,
I have the following text in one of our fields -
var str = 'Running: Yes
Link status: Connected to cloud.xxx.com:
UUID: a49167c7-xxx-yyy-zzz-01234567zx00';
I need to extract the UUID value from this text and update it to one of our UUID fields. How can I extract this UUID tag value? Greatly appreciate your help. Thank you.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2022 10:02 AM
Hi,
Try below in background script once.
var str = 'Running: Yes Link status: Connected to cloud.xxx.com: UUID: a49167c7-xxx-yyy-zzz-01234567zx00';
var splittogettext=str.split('UUID:')[1];//This gives text after UUID
gs.print(splittogettext);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2022 10:02 AM
Hi,
Try below in background script once.
var str = 'Running: Yes Link status: Connected to cloud.xxx.com: UUID: a49167c7-xxx-yyy-zzz-01234567zx00';
var splittogettext=str.split('UUID:')[1];//This gives text after UUID
gs.print(splittogettext);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2022 10:06 AM
Hi Jaspal,
I think it should be:
var str = 'Running: Yes Link status: Connected to cloud.xxx.com: UUID: a49167c7-xxx-yyy-zzz-01234567zx00';
var splittogettext=str.split('UUID: ')[1];//This gives text after UUID
gs.print(splittogettext);
Otherwise the splittogettext variable will have one whitespace at the start of the variable and this will probably cause issues if the value is being used elsewhere.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2022 10:09 AM
Yes. Agreed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2022 10:07 AM
Thanks a lot. I thought I have to use regex.match() to get this value from the expression.