Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Extracting a Set of numbers from String

Grail030510
8 - Asteroid

I would like to ask for help and guidance,

 

What is the best format to use in RegEx in extracting the set of numbers coming from the following set

 

Example:

Loan Number: 423454546565_x000D_     Extracted Should be:   423454546565

 

or

 

Loan #: 1234567894_x000D_                    Extracted Should be: 1234567894

 

or

 

Re Loan #: 1234567890_x000D_               Extracted Should be: 1234567890

 

Thank you so much in advance

 

5 REPLIES 5
Raj
16 - Nebula

@Grail030510 
use this in reg ex
(\d+)_x000D_

find the workflow attached
mark done if solved.

alexnajm
18 - Pollux
18 - Pollux

how about this?

Grail030510
8 - Asteroid

@alexnajm AND @Raj 

 

Sorry for the long feedback, Both of your solution works great, though I have one last question, Is there a way that I can solve this issue.

 

Given: 

 

Serial Number: 204 345 1234

 

To be extracted:

 

2043451234

 

Thank you.

 

alexnajm
18 - Pollux
18 - Pollux

@Grail030510 fantastic - if you could then accept one or multiple replies as the solution, it would be greatly appreciated.

 

For your second question, you would just use a Replace function to replace the space with nothing - Replace([Serial Number], " ", "")

flying008
15 - Aurora

@Grail030510 

 

FYI.

录制_2024_07_09_08_57_52_950.gif

Labels
Top Solution Authors