PrivateUser
PrivateUser

Reputation: 4524

preg_replace - get tweet id from twitter status url

This is how my status url look like

http://twitter.com/username/statuses/303095169115357184

Now i would like to get the tweet id 303095169115357184 using preg_replace.

Can someone help me with regex?

Upvotes: 0

Views: 670

Answers (1)

Rob
Rob

Reputation: 12872

No need to use preg_replace().

$id = basename($url)

Upvotes: 6

Related Questions