• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 352
  • Last Modified:

Need help porting javascript regex replace statement to vb.net

I currently have this expression in a javascript method and need to port it over to vb.net

tmpMsg = rawNote.replaceAll("<!--(.|\s)*?-->","")

I guess this is essentially removing comment tags within a html string?

In any event, how do I do the same thing in vb.net?
1 Solution
käµfm³d 👽Commented:
That pattern will work fine in VB.NET.


Dim tmpMsg As String = System.Text.RegularExpressions.Regex.Replace(rawNote, "<!--(.|\s)*?-->","")

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

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