473,414 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Searching for Text in a TextBox

Short of going char by char, how do I search for a pattern in the text for a
textbox

Thanks
MoonWa
Nov 17 '05 #1
3 1634
Hi,

You can use RegularExpressions

cheers
Salva
"MoonWa" wrote:
Short of going char by char, how do I search for a pattern in the text for a
textbox

Thanks
MoonWa

Nov 17 '05 #2
Hi MoonWa

You can quick do a search using String.IndexOf on the Text attribute to find
if a string appears within your text, then if you need to highlight it you
can use the TextBox.SelectionStart property.

Here is a sample:

http://msdn.microsoft.com/library/de...starttopic.asp

Alex

"MoonWa" <Mo****@discussions.microsoft.com> wrote in message
news:C6**********************************@microsof t.com...
Short of going char by char, how do I search for a pattern in the text for
a
textbox

Thanks
MoonWa

Nov 17 '05 #3
Thanks!!!!!!!!!!!
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Andy | last post by:
I am having trouble using the ComboBox in my app. I am attempting to use the text from the ComboBox, to search the list box portion. However: In my "TextChanged" event: I cannot get the value...
35
by: Cor | last post by:
Hallo, I have promised Jay B yesterday to do some tests. The subject was a string evaluation that Jon had send in. Jay B was in doubt what was better because there was a discussion in the C#...
1
by: jshaulis06 | last post by:
ok, heres my problem. im trying to make a program that searches a text file with a key word created by the user and prints it in a list box. sorta like a dictionay program in vb.net heres what i...
4
by: libsfan01 | last post by:
Im not entirely sure this involves JS but bear with me... I'm looking to implement a system on a site where the user starts to type in the search box (textbox) what they are looking for and this...
1
by: sivagururaja | last post by:
Hi All, Im using ASP.NET with C#. (.NET 2005) In my page i want to allow the user to search the text from the SQL table. This is my table ID Name City State 1 Parry ...
12
by: tshad | last post by:
Does anyone have or know where I can get a some code that will check a TextBox for inappropriate language. At the moment, we need to manually check submissions for language before posting. This...
8
by: fniles | last post by:
I am using VB.NET 2008. I would like to search a textbox (find next and find previous), and when it finds the text, move my cursor in the textbox to where the found text is. How can I do that ?...
3
by: Andy B | last post by:
I need to search an xml element for blocks of text. The start of the text block will have a 5 digit number in it and i then need to read until the next 5 digit number. After this, I need to put...
4
by: aaronkmar | last post by:
Hello Bytes, I hope this post finds you well on this wonderful Friday! I've been kicking this code around for over a week now and cannot seem to find the correct syntax to handle all of the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.