Skip to main content
Nintex Community Menu Bar

Extract a 10 digit numeric from string using regular expressions

  • October 19, 2016
  • 2 replies
  • 22 views

Forum|alt.badge.img

I need to extract a 10 digit numeric from string using regular expressions.

The 10 digit numeric is prefixed with N  (e.g. N121212127)

This string will be within a longer string e.g. abc xyz N121212127 abc 123

Extract to return 121212127 in this example.

Any assistance would be appreciated 

2 replies

Forum|alt.badge.img+11
  • Scholar
  • October 26, 2016

Hi ,

If you still have not found solution then here is (not efficient) way of doing it.

Add Regular expression action in your workflow, use pattern as : N[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]

Use action as extract and save to variable varStr

Use another Regular expression, use pattern: N

Use action as replace. The replacement text will be blank and input text will be varStr. Store the result back to varStr.

e.g. if str is : This is N453432563 times number

output after 2 regular expressions should be 453432563.


Forum|alt.badge.img+14
  • Scholar
  • October 30, 2016

it's even possible with single regex like

(?!N)d{9}

btw, there is just 9 digits in your example...