.NET Framework Bookmark and Share   
 index > Regular Expressions > VB Macro
 

VB Macro

To search for a particular string in a word and if found replace it with blank
Shanavasva
if you know the particular string you can just use the String.Replace function


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Label1.Text = "catatonic"
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim search As String = "ton"
        Label1.Text = Label1.Text.Replace(search, "")
    End Sub
jwavila
Are you trying to create a Macro that will do this in the editor?
John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
JohnGrove

You can use google to search for other answers

Custom Search

More Threads

• Complex Regular Expressin Please help
• Foreign Characters
• Regular Expression for US and International Phone Numbers
• Regex.Matches: Slow Processing
• Why . operator is not matched?
• Substring in a Url
• Simple condition, I think
• Regular expression for ..
• SplittingaLongUrl
• Split two numbers with delimiter