Cut substring to the end after the last space

Hi everyone.

I have many string with format same as “hgfjdk kwoowjc wjdhfg juj GT5645”

I want to cut substring from the last space to the end. The substring will got as above string is “GT5645”

How to do that ?

Hi,

I think there are several ways to achieve it. The following is one of them, for example.

System.Text.RegularExpressions.Regex.Match(text,"\S+$").Value

Regards,

1 Like

Thanks you bro :slight_smile: