Alteryx Designer Desktop Discussions

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

Extract specific text from URL

saivig68
7 - Meteor

Hi All , 

 

Here is an example below : 

https://www.google.com/search/?text=alteryx + Designer + version&rlz=1C1GGRV_enUS751US751&oq=alteryx&aqs=chrome..69i57j69i59j69i60l2j69i59j69i60.1399j0j7&sourceid=chrome&ie=UTF-8

 

I want to extract the search key words from the URL 

 

so I should extract the following:

  • alteryx 
  • Designer
  • version

 

All the URL will contain "search/?text=" before the keywords , multiple keywords separated by + but the content after the keywords can change and there is no pattern to it. 

 

Thanks

3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus

Hi @saivig68,

 

Here is a "simple" approach.  What I see is the following:

  • boring stuff
  • text=
  • good stuff
  • &
  • more boring stuff

I used a formula tool & created a field [URL Parsed] as a string with this formula:

REGEX_Replace([URL], ".*?text=(.*?)\&.*", '$1')

That finds the "good stuff" sandwiched between boring stuff and more boring stuff.

Then I updated the "good stuff to make parsing simple:

REGEX_Replace([URL Parsed], "\s*\+\s*", '|')

I used the regex expression to find zero, one or more spaces followed by one + sign followed by zero, one or more spaces.

 

Now you can readily extract and play with your terms.

 

capture.png

 

Cheers,

 

Mark

 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
saivig68
7 - Meteor

Thanks  @MarqueeCrew , the solution works for multiple keywords and parses everything for single term URL

Example : https://www.qwerty.com/search/?text=Term+

saivig68
7 - Meteor

@MarqueeCrew

 

I added the following step for single keyword terms 

 

Capture.JPG

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels