Jump to content

One Last Regex


e1seix

Recommended Posts

I'm getting there. I need help with a parser script.

 

One of my columns in my database contains a url link. Within the url link, the very final part is always "m=" and the value is always a number between 1 and 9999

 

eg. www.mysite.com/index.php?a=34792&b=ndsvdsl&m=54

 

I need a parser code to extract the "54" value so I can keep it separate in another column. I think this will be a regex parser which is why I'm struggling.

 

- The value of "m" will always be a number within the limits above.

- It's not guaranteed to be a zero-filled number (ie. 54, not 0054)

- The "m" value will always be the last thing in the url address

 

Can someone guide me?

 

Many thanks.

 

 

Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.