Alteryx Designer Desktop Discussions

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

RegEx Help

arbencukaj
7 - Meteor

Hello everyone,

 

I am trying to create a code where I can extract a 9 digit number following the words "Loan ID" or "LID". For example, "Loan ID 000001234". Sometimes there are 2 Loan ID's that need to be extracted. I then need to have those Loan ID's put into a separate column.

 

Does anyone have any experience with this type of coding or use in the Reg Ex tool? Any help would be greatly appreciated!

8 REPLIES 8
IraWatt
17 - Castor
17 - Castor

Hey @arbencukaj,

Here is an example of how to do this:

IraWatt_0-1659535411578.png

If you want to learn more about Regex the community has some really quick interactive videos on getting to grips with it here https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Parsing%20...

 

Any questions or issues please ask

Ira Watt
Technical Consultant
Watt@Bulien.com 

 

Watermark
12 - Quasar
12 - Quasar

Arbencukaj, 

 

Does it actually say  LOAN ID or LID after the second number? or is there just a space between the 2 numbers?

arbencukaj
7 - Meteor

 Some may say LID 123 and 456. Another could say LID 123 & 456. 

 

The LID's are in a comment section that is usually a paragraph in length so I was hoping that the Reg Ex tool could locate them and then extract them into a separate columns. From there I would use them for automated emails.

IraWatt
17 - Castor
17 - Castor

Hey @arbencukaj,

I have attached an example what would you want as the expected result for the LID 123 & 456?

IraWatt_0-1659537560983.png

 

arbencukaj
7 - Meteor

Thank you Ira!

 

I think that got me pretty close however the Loan Id's are sometimes scattered in a comment section (Column Name: Comments) which I want to extract from. Here is an example below:

 

LOAN TERM from COMPANY NAME. securing LOAN ID 000001234 100% LV per DOC xxxx-xxxxxxxx 30 Day EXP - 01/Oct/2022 15 Day EXP - 20/Aug/2022 Actual EXP - 01/Nov/2022

 

As you can see, I just need extract what is highlighted in blue and to be put in a column by itself

IraWatt
17 - Castor
17 - Castor

Ah okay @arbencukaj, I added a data cleaning tool to remove the unnecessary data:

IraWatt_0-1659537943131.png

 

arbencukaj
7 - Meteor

Thank you!! That worked :))

IraWatt
17 - Castor
17 - Castor

No worries @arbencukaj, great to hear 😄

Labels