1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

scraper in JS that I need some help with (3 seconds...)

Discussion in 'HTML & JavaScript' started by XoRaK, Sep 14, 2015.

  1. XoRaK

    XoRaK Regular Member

    Joined:
    Oct 28, 2009
    Messages:
    313
    Likes Received:
    251
    Occupation:
    social worker
    Location:
    Belgium
    Hi

    I have a javascript scraper that scrapes youtube urls for A twitter username in the description.


    var regexp = /twitter.com\/([a-zA-Z0-9]{2,23})\s*/gi;



    there is one problem, it doesn't save anything behind _ it this symbol is in the twitter username...

    twitter username best_vines is saved as best

    Can someone change the var regex part for me?

    Greetz

    XoRaK
     
  2. XoRaK

    XoRaK Regular Member

    Joined:
    Oct 28, 2009
    Messages:
    313
    Likes Received:
    251
    Occupation:
    social worker
    Location:
    Belgium
    Found out how to do it myself, thx anyway!

    var regexp = /twitter.com\/([a-zA-Z0-9_]{2,23})\s*/gi;