How to filter this string

Hi,

I would like to filter these set of string but I am unsure on how to do it.

Example:
Showing 1-2 of 2 records.

I want to keep the “2” next to the records, how should I do it?

The “2” next to the records is also a dynamic value.

Appreciate the kind advices :slight_smile:

@Captainshame
Please use the below code
(text.Substring(text.LastIndexOf(“of”)+2)).Replace(“records.”,"").Trim

Hi,

Can you try the following expression?

System.Text.RegularExpressions.Regex.Match(text,"\d+(?=\s*record)").Value

Regards,

4 Likes