Need to parse out a portion of a URL query string

sbrien

New Member
Joined
Jun 5, 2012
Messages
19
I have a few hundred URLs that include campaign ID strings within them. I need a way to separate out the specific IDs from each URL.

All of the campaign IDs are preceded by "?cid=" and they all follow a pattern of having seven sets of characters, each separated by a dash (e.g. xx-xxx-xxx-xx-xx-xxx-x). The problem is that the number of characters in each set is not consistent. Only the number of sets remains the same.

Is there a way to extract just the specific string of characters immediately following the "?cid=" that includes those six dashes?

Thanks,
Sbrien
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi Sbrien,

I can not think of a solution for this at the moment without using VBA (macro).
But do you have some examples of the full urls?
Is there always a specific string directly behing the seven sets, e.g. a comma, end of line or another question marked identifier?
If so, that would make life a lot easier.

Paul
 
Upvote 0
Hi

What comes after the six dashes data? How do we know, after the 6 dashes, that the data you want ended?
 
Upvote 0

Forum statistics

Threads
1,215,330
Messages
6,124,307
Members
449,151
Latest member
JOOJ

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top