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

Find and replace for richtextbox functionality in vb.net 2.0

Hi,
Can anybody give an example of 'Find, replace and replaceall functionality for richtextbox which is case INSENSITIVE.

Cheers
0
RIAS
Asked:
RIAS
  • 3
1 Solution
 
Alpha AuCommented:
the following code change all "Abc" , "ABc" etc in RichTextBox1 to "cde"


 Me.RichTextBox1.Text = Me.RichTextBox1.Text.ToLower.Replace("abc", "cde")

Open in new window

0
 
Alpha AuCommented:
the following code return true if richtextbox1 contains "abc" or "Abc" etc




me.RichTextBox1.Text.ToLower.Contains("abc")

Open in new window

0
 
RIASAuthor Commented:
Cheers for the reply but the code I am using is
  'find the start of the next found item in the sql file
                xStart = SQLBox.Find(xFind, SearchFrom, Windows.Forms.RichTextBoxFinds.WholeWord)

S othe suggestions aren't working :<
         
0
 
Alpha AuCommented:
how about this?


xStart = InStr(0, Me.SQLBox.Text.ToLower(), "abc", CompareMethod.Text)

Open in new window

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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