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
https://forums.phpfreaks.com/topic/195498-one-last-regex/
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.