Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2013-02-03
1
Medium Priority
?
267 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 2000 total points
ID: 38848701
(?!(?:src|href)=)"(.+?)(?:jpg|gif|png|css)"

Open in new window

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
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…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

610 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