Solved

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

Posted on 2013-02-03
1
263 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: 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

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

696 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