Hi, I need to get the value “Termlife”: “30yr LT” and here is my input text. How to get value either in substring/regex?
1, Product:
El Term Life: El 10Yr LT El 15Yr LT E 20Yr LT El 25Yr LT El 30Yr LT
111 Whole Life: 0 SL E L10 111 L15 0 L20 0 L@65 E SPL
El Other:
Try this
(\d+Yr LT)
System.Text.RegularExpressions.Regex.Matches(Input.ToString(),"(\d+Yr LT)").Last.Value
Regards,
- str_InputText is your Input Text
To get all the values:
System.Text.RegularExpressions.Regex.Matches(str_InputText,"\d+Yr LT")
To get the Last Value:
System.Text.RegularExpressions.Regex.Matches(str_InputText,"\d+Yr LT").Last
Hope it’ll helps you ![]()
Cheers !!
Use Matches you used Match
System.Text.RegularExpressions.Regex.Matches(str_InputText,"\d+Yr LT").Last
Thanks,
Ashok ![]()
Sorry! my bad, Use this one.
System.Text.RegularExpressions.Regex.Matches(str_InputText,"\d+Yr LT").AsEnumerable().Last().Value
Thanks,
Ashok ![]()
Try typing the LINQ.
Output:

Have this sample workflow which is running on my machine.
Sample.xaml (8.5 KB)
Thanks,
Ashok ![]()
Try this:
Product = System.Text.RegularExpressions.Regex.Matches(str_InputText,"\d+Yr LT").Last.Value
Note: Make sure System.Text.RegularExpressions is imported.

Happy Automation ![]()








