User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 361,939 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,662 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 548 | Replies: 6
Reply
Join Date: Jan 2008
Posts: 13
Reputation: Yuexuan is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
Yuexuan Yuexuan is offline Offline
Newbie Poster

how to find specific word in text with vb.net

  #1  
Apr 9th, 2008
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,
Newbie for programming
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2007
Posts: 286
Reputation: ericstenson is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 28
Colleague
ericstenson's Avatar
ericstenson ericstenson is offline Offline
Posting Whiz in Training

Re: how to find specific word in text with vb.net

  #2  
Apr 9th, 2008
sBIG.contains("WHATEVERYOUWANTTOFIND")

so like:

if SBIG.contains("#") then

label1.text = "Hello World"

end if
--
"Dummy."
Reply With Quote  
Join Date: Mar 2008
Location: Wales
Posts: 30
Reputation: BluePaper is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
BluePaper's Avatar
BluePaper BluePaper is offline Offline
Light Poster

Re: how to find specific word in text with vb.net

  #3  
Apr 10th, 2008
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
Stone In Focus - Caffeine Group - CoffeePHP - Open Notes - Onyx - Redpoint Network - Espresso
Reply With Quote  
Join Date: Dec 2007
Posts: 286
Reputation: ericstenson is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 28
Colleague
ericstenson's Avatar
ericstenson ericstenson is offline Offline
Posting Whiz in Training

Re: how to find specific word in text with vb.net

  #4  
Apr 10th, 2008
Thanks, can you mark as solved and give me some reputation points?
--
"Dummy."
Reply With Quote  
Join Date: Mar 2008
Location: Wales
Posts: 30
Reputation: BluePaper is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
BluePaper's Avatar
BluePaper BluePaper is offline Offline
Light Poster

Re: how to find specific word in text with vb.net

  #5  
Apr 10th, 2008
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
Stone In Focus - Caffeine Group - CoffeePHP - Open Notes - Onyx - Redpoint Network - Espresso
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 1,774
Reputation: peter_budo has a spectacular aura about peter_budo has a spectacular aura about 
Rep Power: 8
Solved Threads: 184
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Monster is back

Re: how to find specific word in text with vb.net

  #6  
Apr 11th, 2008
Originally Posted by ericstenson View Post
Thanks, can you mark as solved and give me some reputation points?

Begging for reputation, where this community going???
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Join Date: Dec 2007
Posts: 286
Reputation: ericstenson is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 28
Colleague
ericstenson's Avatar
ericstenson ericstenson is offline Offline
Posting Whiz in Training

Re: how to find specific word in text with vb.net

  #7  
Apr 13th, 2008
oh, man, it's not where it's going, it's where it has gone...
--
"Dummy."
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP.NET Marketplace
Thread Tools Display Modes

Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 11:24 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC