DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   ASP.NET (http://www.daniweb.com/forums/forum18.html)
-   -   how to find specific word in text with vb.net (http://www.daniweb.com/forums/thread118163.html)

Yuexuan Apr 9th, 2008 12:47 am
how to find specific word in text with vb.net
 
Hi,
I m currently working in VB.NET with asp.net
I have the following string:
sBIG = LTC16CS#PBF
I need to find whether the above word contains any word say "#"
How to get it?
i need to capture "#" to do if else statement
I could not find a method in VB.net that can provide me the result.
Thanks,

ericstenson Apr 9th, 2008 1:00 pm
Re: how to find specific word in text with vb.net
 
sBIG.contains("WHATEVERYOUWANTTOFIND")

so like:

if SBIG.contains("#") then

label1.text = "Hello World"

end if

BluePaper Apr 10th, 2008 4:27 pm
Re: how to find specific word in text with vb.net
 
mhmm, this may come in useful personally to actually, especially checking for the @ symbol in an email address, although there's probably better ways to do it :)

ericstenson Apr 10th, 2008 4:33 pm
Re: how to find specific word in text with vb.net
 
Thanks, can you mark as solved and give me some reputation points?

BluePaper Apr 10th, 2008 5:28 pm
Re: how to find specific word in text with vb.net
 
hehe, I'll give you rep seeing as I keep on forgetting to do that to people but I didn't start the thread so we'll have to wait and see what the original poster says ;)

peter_budo Apr 11th, 2008 8:09 pm
Re: how to find specific word in text with vb.net
 
Quote:

Originally Posted by ericstenson (Post 581820)
Thanks, can you mark as solved and give me some reputation points?


Begging for reputation, where this community going???

ericstenson Apr 13th, 2008 10:55 pm
Re: how to find specific word in text with vb.net
 
oh, man, it's not where it's going, it's where it has gone...


All times are GMT -4. The time now is 10:57 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC