Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Regex Tool: Extracting characters

rajatsadan
8 - Asteroid

Hi, I was working on a dataset and wanted to extract an expression between 2 characters :

 

Sample Dataset:

T14s |1300g| 25cm 30cm 33cm Black

 

In the above expression I wanted to retrieve only the following information: 1300g

I tried the following expression: \|\d{4}\|

The data parsed was as follows: |1300g|

Ca anyone let me know how to avoid the | characters in the parsed data?? Much appreciate. 

7 REPLIES 7
atcodedog05
22 - Nova
22 - Nova

Hi @rajatsadan ,

 

Here is the expression use it in RegEx tool parse

 

 

.*\|(\d{4}.)\|.*

 

 

 

atcodedog05
22 - Nova
22 - Nova

Hi @rajatsadan ,

 

Here is a workflow for the task.

 

Input : T14s |1300g| 25cm 30cm 33cm Black

Output :

atcodedog05_0-1601655766377.png

Workflow

atcodedog05_1-1601655781341.png

 

Hope this helps : )

 

If this post helps you please mark it as solution. And give a like if you dont mind😀👍

vizAlter
12 - Quasar

Hi @rajatsadan —  Try this solution too...use the expression below in a RegEx tool with Parse output method

 

\|(.+)\|

 

vizAlter_0-1601663602810.png

 

 

 

rajatsadan
8 - Asteroid

Thanks!!

rajatsadan
8 - Asteroid

Thank you!!

vizAlter
12 - Quasar

Thank you!

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @rajatsadan 

 

Cheers and Happy Analysing 😀

Labels
Top Solution Authors