Solved

Reguler Expression in.NET

Posted on 2003-11-18
4
350 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
4 Comments
 
LVL 4

Accepted Solution

by:
krznpsk earned 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
A short article about problems I had with the new location API and permissions in Marshmallow
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

895 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now