Validating using regular expression

Discussion in 'JavaScript' started by priyakochin, Jul 16, 2008.

  1. #1
    I am having less knowledge in js

    here is a code :
    It validates url

    but I want to validate only rapidshare.com links

    plz help
     
    priyakochin, Jul 16, 2008 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    
    /^http://(www\.)?rapidshare\.com\/files\/\d+\/[\w-\.]+$/
    
    Code (javascript):
     
    nico_swd, Jul 19, 2008 IP