Author Topic: One Last Regex  (Read 372 times)

0 Members and 1 Guest are viewing this topic.

Offline e1seixTopic starter

  • Enthusiast
  • Posts: 167
  • Gender: Male
    • View Profile
    • DOGFIGHTUK Men's Grooming
One Last Regex
« on: March 16, 2010, 05:46:45 PM »
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.


Offline phant0m

  • Enthusiast
  • Posts: 164
  • Gender: Male
    • View Profile
Re: One Last Regex
« Reply #1 on: March 26, 2010, 10:37:29 AM »
m\=(\d+)$