Solved

Reguler Expression in.NET

Posted on 2003-11-18
4
352 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
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…

777 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