I have this string 1m3s49s53s1m4s1m0s2m27s
its like a time and i want to extract last time but sometimes last time like 2m27s and sometimes only 27s
how to archive that
I have this string 1m3s49s53s1m4s1m0s2m27s
its like a time and i want to extract last time but sometimes last time like 2m27s and sometimes only 27s
how to archive that
Also the numbers always changing
Hi,
If second part always exists, the following will work.
System.Text.RegularExpressions.Regex.Match(yourString,"(\d+m)?\d+s$").Value

Regards,
Hey @rawanghurab1
Regards,
Ajay Mishra
Thankyou so much Itβs Working
It will work for your condition,
- Assign -> Input = "1m53s1m38s1m47s1m3s49s53s1m4s1m0s2m27s"
- Assign -> Output = System.Text.RegularExpressions.Regex.Matches(Input.toString, "\d+m?\d+s?").Cast(Of Match)().Last.toString
Check the below workflow for better understanding,
Hope it helps!!