Hi,

I'm trying to use javascript regexp to find the following.

var url = "http://cgi.ebay.com/BRAND-NEW-UNLOCKED-32-GB-Apple-iPhone-3GS-3G-S-Any-Sim-/320459852842?cmd=ViewItem&pt=Cell_Phones&hash=item4a9ce54c2a";


I need to get 320459852842 from the above url.

This is the regexp i'm using which doesnot get me the result.
var matched = url.match('^http:\/\/.*(?=\/)?([\d]+)*(?=\?|cmd)*/');

Pls Help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.