- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 11:28 PM
Hello Team,
I am looking for the help to extract RITM number from the below text. Here date & RITM number will may changes as per the created date .
Text is --- "[01-12-2023 RITM#10273187] Company created"
Thanks in advance
Vinay
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 12:14 AM
Hi @Vinay49 ,
Try updated code
var a = '[01-12-2023 RITM#10273187] Company created';
a = a.split(']');
var b = a[0].split(' ');
b = b[1];
gs.info(b);
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 10:50 PM
@Vinay49 you can also use the below code:
var text = '[01-12-2023 RITM#10273187] Company created';
var t1 = text.slice(0,-16);
var t2 = t1.slice(1,-15);
gs.info("t2 "+t2);
var t3 = t1.slice(11,-1);
var t4 = t3.split('#');
var t5 = t4[0] + t4[1];
gs.info("t5" + t5);