0
Regex help

/t5/coldfusion-discussions/regex-help/td-p/888098
Dec 11, 2008
Dec 11, 2008
Copy link to clipboard
Copied
Hello i need some help with regex to do the following
String to get:
http://www.domain.com/images/pic.jpg
String to search:
<img src=" http://www.domain.com/images/pic.jpg" width="202" height="62" />
Using the following regex expression:
<img src="([^>]*[^/]?)>
So far when i run this it grabs the following:
http://www.domain.com/images/pic.jpg" width="202" height="62" /
Any help is very much appreciated.
String to get:
http://www.domain.com/images/pic.jpg
String to search:
<img src=" http://www.domain.com/images/pic.jpg" width="202" height="62" />
Using the following regex expression:
<img src="([^>]*[^/]?)>
So far when i run this it grabs the following:
http://www.domain.com/images/pic.jpg" width="202" height="62" /
Any help is very much appreciated.
TOPICS
Advanced techniques
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/coldfusion-discussions/regex-help/m-p/888099#M81718
Dec 12, 2008
Dec 12, 2008
Copy link to clipboard
Copied
Mrs. Man wrote:
> Hello i need some help with regex to do the following
>
> String to get:
> http://www.domain.com/images/pic.jpg
>
> String to search:
> <img src=" http://www.domain.com/images/pic.jpg" width="202" height="62" />
>
> Using the following regex expression:
> <img src="([^>]*[^/]?)>
<img src="([^"]*)"
--
Mack
> Hello i need some help with regex to do the following
>
> String to get:
> http://www.domain.com/images/pic.jpg
>
> String to search:
> <img src=" http://www.domain.com/images/pic.jpg" width="202" height="62" />
>
> Using the following regex expression:
> <img src="([^>]*[^/]?)>
<img src="([^"]*)"
--
Mack
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/coldfusion-discussions/regex-help/m-p/888100#M81719
Dec 14, 2008
Dec 14, 2008
Copy link to clipboard
Copied
You could just begin the regex with http, like this:
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/coldfusion-discussions/regex-help/m-p/888101#M81720
Dec 14, 2008
Dec 14, 2008
Copy link to clipboard
Copied
Thank you very much BKBK and Mack, both solutions were a lot
of help.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

