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
Solved

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

Posted on 2013-02-03
1
260 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
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 …

840 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