Eric said:
Hi: How to i search ":" in a sentence. For eg:
abc efg hij : kkk ddd lll
fda fdasf jfdas fdas fsad
When i read a line i want to skip those lines where ":" is present
data = ts.ReadLine
Consider using Regular Expressions - in my experience they're much
faster and easier than loops which perform string comparisons --
because you can return an entire matching file in one line of code --
but are tricky to get the hang of.
This site is a good place to start:
http://www.regular-expressions.info/index.html
http://www.regular-expressions.info/completelines.html
This site describes how to use them in ASP:
http://www.4guysfromrolla.com/webtech/090199-1.shtml
And finally this actual expression should match your original problem,
assuming you're using a text file:
^.*:.*$
This looks I just fell on the keyboard, but what it means is:
^.* = a series of 0 or more characters starting at the begining of
the line
: = your search condition, the colon in this case
..*$ = another series of 0 or more characters until the end of the line