1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

regular expression

Discussion in 'Programming' started by ssimon171078, Mar 20, 2015.

  1. #1
    i have html code i need to build regular expression to download jpg file:
    <div class="heightContainer"
                                        style="padding-bottom: 311.864406%"
        >
        <img        src="https://s-media-cache-ak0.pinimg.com/236x/ae/9e/15/ae9e15d54884d6e1791971c45c24c2ce.jpg"
                class="pinImg fullBleed"
        style=""        onload="P.lazy.onImageLoad(this)"
                alt="Cropped slit city style"
        >
    
    </div>
    
    HTML:

     
    ssimon171078, Mar 20, 2015 IP
  2. Kidsta

    Kidsta Member

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    38
    #2
    Try
    (https?:/)?(/?[\w_\-&%?./]*?)\.(jpg|png|gif)
    Code (markup):
    This should grab anything which begins with http and ends in .jpg/.png/.gif. For any other extensions, just modify the "(jpg|png|gif)" part.
     
    Kidsta, Mar 20, 2015 IP