• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 125
  • Last Modified:

Parse keys to return portion of key with Regex

Hi! Looking for some regex help again...

I have an analytics tool which allows me to take Regex and pull out specific parts of a key. In my example below, I'm looking to pull out the values which are in the third slot of the delimiter ":" and I can use the $ to reference a value to return.

Example Keys
     gglp:paidsearch_nb:paid keyword:rewardsclub

Expected Result
     (no match expected)
     paid keyword

What I've tried:
This failed -->

Open in new window

This failed -->

Open in new window

and then I referenced $1  to return what was matched

Results Returned with what I've tried:
None -- all tries have failed. :( Help please!
Elizabeth "Smalls" Eckels
Elizabeth "Smalls" Eckels
2 Solutions

pls try to catch the second element (maybe $2)


Open in new window

Dan CraciunIT ConsultantCommented:
Or stick with $1:

Or, if "gglp:paidsearch" is a constant:

Elizabeth "Smalls" EckelsDigital Analytics ConsultantAuthor Commented:
Thanks @RGonzo and @Dan - both worked great!

Featured Post

The IT Degree for Career Advancement

Earn your B.S. in Network Operations and Security and become a network and IT security expert. This WGU degree program curriculum was designed with tech-savvy, self-motivated students in mind – allowing you to use your technical expertise, to address real-world business problems.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now