Solved

Regex help not include the "src" or "href"

Posted on 2013-02-03
1
261 Views
Last Modified: 2013-02-03
How can I not include the "src" or "href"?


(src|href)="(.+?)(?:jpg|gif|png|css)"

Text:
<a href="/Modules/Store/Products/CustomDetails/Images/1.jpg">
<link href="/Stylesheets/all.css" rel="stylesheet" type="text/css" />
<img src="/Images/Logo.png">

Current Match:
href="/Modules/Store/Products/CustomDetails/Images/1.jpg"
href="/Stylesheets/all.css"
src="/Images/Logo.png"

Desired Match:
"/Modules/Store/Products/CustomDetails/Images/1.jpg"
"/Stylesheets/all.css"
"/Images/Logo.png"
0
Comment
Question by:JRockFL
1 Comment
 
LVL 20

Accepted Solution

by:
informaniac earned 500 total points
ID: 38848701
(?!(?:src|href)=)"(.+?)(?:jpg|gif|png|css)"

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question