Seperate a URL variable into two separate variables

Hi,

I have a variable that is passed to a page via URL.
https://www.example.com/?code=12345-122222

What I need to do is take the ‘code’ variable and split it into two separate variables, ‘var_val’ and ‘var_ref’, so the above would be var_val=12345 and var_ref=122222

I get the ‘code’ variable by using Define Query Params on the page, but it’s splitting the ‘code’ variable into the new separate variables which I am struggling with. The Hyphen will also denote the split.

Any help would be great.

Thanks,
Ray

Community Page
Last updated: