Regular expressions [modified]
-
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