Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Bengaluru, IN

Welcome to the Bengaluru User Group

Click in the JOIN GROUP button in Home to follow our news and attend our events!

Extract voucher id

Neeta_Latwal
7 - Meteor

Hi All, 

 

Could you please help me to extact the voucher number for below examples:- 

 

 

DescriptionExpected Result 
Account payable 126 EMR 00012345 00012345 
BCX payable 157 LRN 0001251200012512
ARB 12345661234566

NRT 12345600

 

12345600
TTT 1234565

 

1234565

 

Regards, Neeta

6 REPLIES 6
Paras_G
7 - Meteor

You can use Right() command in the formula tool or Reg Ex to extract it.

Neeta_Latwal
7 - Meteor

Hey, thanks for your resonse but right would not be appliable as we have more data in description, have restruct my data. could you please help

 

DescriptionExpected Result 
Account payable 126 EMR 00012345 dddd 00012345 
BCX payable 157 LRN 00012512 1235700012512
ARB 1234566 ddd7991234566

NRT 12345600 89766 dddd

 

12345600
TTT 1234565  55566 ddddd

  

1234565

 

 

kamal03
9 - Comet

Hi @Neeta_Latwal 

 

You can try the below workflow to get the desired output. Let me know if it works for you or not. Let me know if your requirement is something else.

 

Please see the below screenshot for your referenc

 

 

image (4).pngimage (3).pngimage (2).png.

 

Thanks

Neeta_Latwal
7 - Meteor

Hey can you paste the workflow and logic here please if possible 

kamal03
9 - Comet

I have attached the screenshots. Please check now,thanks

p-g
8 - Asteroid

Hi Neeta. You can leverage Microsoft Bing Chat on Edge Browser for these scenarios. It provides you the answer along with the logic and steps for your benefit.

Find below the response it provided for your above query:

Certainly! Here’s a regular expression (regex) pattern that you can use in your Alteryx workflow to extract the voucher numbers from the given examples:

\b\d{8}\b

Explanation:

  • \b: Represents a word boundary, ensuring that we match complete words.
  • \d{8}: Matches exactly eight digits (which corresponds to the voucher numbers).

Feel free to incorporate this pattern into your Alteryx workflow, and it should extract the voucher numbers as expected. If you have any further requests or need additional assistance, feel free to ask! 😊