How to extract part of number

Hi,

I am trying to enter a SSN from Excel into pdf form which has 3 separate boxes for SSN (3 digits, 2 digits, and 4 digits). How do I extract each part to type into each box? The excel number format is just a single number e.g 123456789.

So I need 123,45, and 6789.

Thanks!

Hi,

You can use Substring method.
image

  • "First Part: "+number.Substring(0,3)
  • "Second Part: "+number.Substring(3,2)
  • "Third Part: "+number.Substring(5,4)

Thanks,
Aisling

1 Like

Hey @richleeb2

You can Use Regex Too, which will be easy to modify in case of changes as well :slight_smile:

Regex Pattern - (\d{1,3})(\d{1,2})(\d{1,4})

Url - regex101: build, test, and debug regex

Workflow Reference - RegexToDivideNumberGroups.xaml (6.7 KB)

Regards…!!
Aksh

3 Likes

Hi @aksh1yadav ,

Really good solution and really good platform to test Regex !! :grinning:

Thanks,
Aisling

Thank you this worked!

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