Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Reguler Expression in.NET

Posted on 2003-11-18
4
Medium Priority
?
368 Views
Last Modified: 2012-06-21
"aleabanr.gif"

<IMG src="cid:000801c3ad09$ab7f3f60$70c0c0c0@whadmin.com" align=3Dbottom>

Reguler expression for replacing cid:000801c3ad09$ab7f3f60$70c0c0c0@whadmin.com
with "aleabanr.gif"

we need to search for <img src= and retrive the "cid...." and then replace it with "aleabanr.gif"

I need the Reguler expression to do this....
0
Comment
Question by:me_new
[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
4 Comments
 
LVL 4

Accepted Solution

by:
krznpsk earned 200 total points
ID: 9797311

Dim imgSrcPattern As String = "<img src=""([^""]*)"""
Dim imgSrcReplace As String = "<img src=""aleabanr.gif"""
' Check RegEx match...
If System.Text.RegularExpressions.Regex.Match(yourText, imgSrcPattern).Success Then
     ' Perform RegEx replace
     yourText = System.Text.RegularExpressions.Regex.Replace(yourText, imgSrcPattern, imgSrcReplace)
End If
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
Make the most of your online learning experience.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Simple Linear Regression

715 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