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

Alteryx Designer Desktop Discussions

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

Help with Regex Statement

hyost
6 - Meteoroid

Good evening. I am using the following Regex expression that a contractor built for me to help pull out the grand totals for some pdfs that I extracted. However, it is not pulling all of the Grand Totals. I cannot use the contractor anymore, so I could really use some help. I don't know the first thing about this. Thank you in advance!

 

.*\*{3}\s\QGrand Totals:\E.*\d*\s\d*\s\d*\s(\d*\,?\d*\.\d\d\-?)

 

Goal: Grab the last set of numbers for each one. For some reason it is only grabbing the 142.00 and the 1,801.65. I need it to grab the 1,859,675.73 and 27,142,097.56 as well. How do I modify the expression to do this? 

hyost_0-1680485614924.png

 

5 REPLIES 5
ShankerV
17 - Castor

Hi @hyost 

 

We could use better regex condition to read the last numbers.

 

Could you please copy and paste the input in excel file, will be helpful to tweak the Regex in better form.

hyost
6 - Meteoroid

Thank you very much for responding. Is this what you are looking for? I apologize, but I'm very new to this.

DataNath
17 - Castor
17 - Castor

Hey @hyost, there's a few ways you could go about this but here's one way if the format is consistent.

 

 

.*\s([^\s]+).*

 

DataNath_0-1680546056354.png

 

ShankerV
17 - Castor

Hi @hyost 

 

Thanks for sharing the inputs as requested.

 

One way of doing this with simple regex statement is as below.

 

.+\s(.+)$

 

ShankerV_0-1680590661408.png

 

Many thanks

Shanker V

hyost
6 - Meteoroid

This worked perfectly. Thank you so very much!

Labels
Top Solution Authors