Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 384
  • Last Modified:

Reguler Expression in.NET

"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
me_new
Asked:
me_new
1 Solution
 
krznpskCommented:

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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now