Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Need some RegEx help, I'm stuck

rjanezic
7 - Meteor

So I'm not that great at RegEx to be honest. So here's what I'm trying to do. I have the video description for every youtube video for a channel

 

Description Example: http://theneedledrop.com http://twitter.com/theneedledrop http://facebook.com/theneedledrop http://theneedledrop.com/support http://theneedledrop.com/category/pod... http://theneedledrop.com/forum FAV TRACKS: RARE CHANDELIERS, THE SYMBOL, SYLVESTER LUNDGREN, DEMOLITION MAN, EGGS ON THE THIRD FLOOR, MODERN DAY REVELATION  LEAST FAV TRACK: DENNIS HASKINS ACTION BRONSON AND THE ALCHEMIST / VICE / 2012 / HARDCORE HIP HOP, EAST COAST HIP HOP 8/10 http://www.theneedledrop.com/loved-li... Y'all know this is just my opinion, right?

 

 

What I want is the 8 from the last line. Each of his videos has a score for the album. I need a way to extract the score.

 

Thank You

 

4 REPLIES 4
cmcclellan
13 - Pulsar

Is this 1 record or 3 records ?

 

I wouldn't use a RegEx, I'd use a SubString() and finding the location of "/10" like this:

 

Substring([F1],FindString([F1], "/10")-1,1)

This will return the 1 character before the "/10" in the field provided.

Thableaus
17 - Castor
17 - Castor

Hi @rjanezic

 

Using the parse method (with the RegEx tool), I'd do this:

 

(?=\b[0-9]|10/10\b)([0-9]|10)/10.*$

 

This might be more specific to your needs.

 

Cheers,

papalow
8 - Asteroid

@rjanezic

I would recommend a RegEx solution.  It isn't the easiest tool to learn but it can be configured to be very precise.  

estherb47
15 - Aurora
15 - Aurora

Hi @rjanezic

 

I'd use a formula tool, with the following expression:

 

REGEX_Replace([text],"(.*?)([0-9]|10)(\/10.*)","$2")

 

This isolates the number before the "/10" in the rating, inclusive of 0-10 for all possible ratings

 

You can modify the existing field with the data, or create a new one. Cheers!!

 

Best,

Esther

Labels