How to get JUN-20 from this string "01-JUN-20_30-JUN-20 " ?
There are multiple ways of doing this:
- Split String
1.1 By _ to split into two dates
1.2 By - to split into portions - Regex (this would most likely be the better solution)
HI @deepak, So your expected result is only JUN-20 its dymanic or static one, because I am seeing 2 recored JUN-20, so how you want the result.
Regards,
Arivu
Hi @deepak_raj,
The below regex can be used to extract the data
.*-([A-z]{3}-[0-9]{2})_
but the month should be in 3 characters and the year should be 2 characters, but can be modified according to the need.
Happy coding!
1 Like
Hi @deepak_raj
This can be achieve by 2 ways.
1st Way by using Regex :-
regexOutputVariable(0).Groups(1)
2nd Way by String Manipulation :-
str.Split(“-“c)(3)+”-”+str.Split("-"c)(4)
Mark as solution and like it
Happy Automation
Best Regards
Er Pratik Wavhal