I’m looking for a way to split a Twitter permalink string on its final forward slash, so I can store the tweet_id. Two examples:
http://twitter.com/bloombergnews/status/55231572781170688
#Google Said to Be Possible Target of U.S. FTC Antitrust Probe - http://ow.ly/4tnpW
— Bloomberg (@business) April 5, 2011
Each URL has a similar format:
http://twitter.com/<screen_name>/status/<id_str>
With what regular expression would I easily capture every time?
This is not a job for regular expressions, IMHO.
I would do this: