In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Help with regex - Stop reading with specific word

jackersantos
8 - Asteroid

I wrote this regex expression to capture anything after "Comments" and now I want to stop reading once alteryx finds "https" for instance. I saw some topics about regex but I couldn't find a way to ask alteryx to stop reading as soon as it finds "https". Any ideas on how to achieve this?

Thanks.

jackersantos_1-1636051532062.png

 

 

5 REPLIES 5
jackersantos
8 - Asteroid

Please ignore the "/webapp". It was just some testing I was doing

fmvizcaino
17 - Castor
17 - Castor

Hey @jackersantos ,

 

You can put everything you want between parenthesis.

(\W+Comments\D.+)?HTTP

 

Best,

Fernando Vizcaino

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @jackersantos,

 

You could use the following in parse mode in a Regex tool:

Comments(.*?)https

 

JonathanSherman_0-1636052269173.png

 

The brackets indicate a capture group and tell Alteryx to extract the part inside, the .*? is a non greedy wildcard expression which effectively means extract everything you can find up to the next iteration of https.

 

Kind regards,

Jonathan

 

jackersantos
8 - Asteroid

Thank you very much!

Jonathan-Sherman
15 - Aurora
15 - Aurora

No problem!

Labels
Top Solution Authors