How to get cell's last 5 character value?

Hello

I want to get post number in this address.

in the address, post number is always in last.

here is the address.
“seoul city gwangjingu 195-1 (p) 49038”

How can I use Assign to get the last 5 numbers?

Hi @hoseongwon ,

Maybe you could try using the below method :

Split("seoul city gwangjingu 195-1 (p) 49038").Last

Hi @hoseongwon ,

Check this below code,
strVar(String type) = System.Text.RegularExpressions.Regex.Match("seoul city gwangjingu 195-1 (p) 49038","[0-9]{5}$", System.Text.RegularExpressions.RegexOptions.Multiline).Value

Hope this may help you :slight_smile:

1 Like

@hoseongwon

You can try this

Str.Trim.SubString(str.Length-5)

Str is where the string is stored

Cheers

Thank you . It was the simplest solution.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.