Check string ends with number

Hi,
this is my string and i want to check whether the string ends with number or not then how i do.

297 13424 h2go bfree Fusion Sport Bottle - 23 oz. 2.7750 824.18

Hello @Rup_1

You try use this way
yourString.Trim.EndsWith(System.Text.RegularExpressions.Regex.IsMatch(yourString, ā€œ[0-9]ā€).ToString)

1 Like

Hey,

\d$

to check if your string ends with a digit

If you want your string to be a ā€œcā€ followed by some digits, use

c\d+$

Regards
Aditya

2 Likes

In ismatch activity use */d$ this if the result is true then string is ending with digit.