Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Regular expressions [modified]

Regular expressions [modified]

Scheduled Pinned Locked Moved ASP.NET
htmlalgorithmsregextutorialquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JimBob SquarePants
    wrote on last edited by
    #1

    Hi all, Couldn't find a regular expression forum so I thought I'd try here as this is for a website. I'm trying to create a regular expression that I can use to parse through some html generated by a wysiwyg html editor. Specifically, I am trying to pick up on paths for images so that I can redirect them to a generic handler to use caching etc. The term I am searching for is like this:

    src="/Images/(any expression)"

    This value could be anywhere in the text eg:

    "This is an example text wrapping the value I am searching for."

    The best I could come up with was

    "^.*?src="/Images/.+?".*?$"

    but that's picking up too much. I realise that I need to read up on regular expressions so I've been going through various sites and looking up cheat sheets but I'm hoping someone here can shed some light in the interim. Thanks in advance! Got it! "

    src="/Images/.+?".*?"

    Now for a celebratory beer!

    JimBob SquarePants ******************************************************************* "He took everything personally, including our royalties!" David St.Hubbins, Spinal Tap about Ian Faith, their ex-manager *******************************************************************

    modified on Friday, October 23, 2009 3:58 PM

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups