PC Review


Reply
Thread Tools Rate Thread

Comparing Strings

 
 
Brij Singh
Guest
Posts: n/a
 
      13th Oct 2003
Hi,

Is there a way to compare two strings with search character

like A = "Apple"
B = "app"

and if user input is "A*" or "a*" or "Ap*" then it will compare equal to
Both A and B above.


Thanks in advace.

Brij



 
Reply With Quote
 
 
 
 
Jay B. Harlow [MVP - Outlook]
Guest
Posts: n/a
 
      13th Oct 2003
Brij,
> and if user input is "A*" or "a*" or "Ap*" then it will compare equal to
> Both A and B above.

"A*" or "a*" or "Ap*" are all examples of regular expressions, have a look
at the System.Text.RegularExpressions namespace. Specifically the RegEx
class.

There are options to make the RegEx case insensitive such that A = a.

Hope this helps
Jay

"Brij Singh" <(E-Mail Removed)> wrote in message
news:3f8b00f3$0$69309$(E-Mail Removed)...
> Hi,
>
> Is there a way to compare two strings with search character
>
> like A = "Apple"
> B = "app"
>
> and if user input is "A*" or "a*" or "Ap*" then it will compare equal to
> Both A and B above.
>
>
> Thanks in advace.
>
> Brij
>
>
>



 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      13th Oct 2003
* "Brij Singh" <(E-Mail Removed)> scripsit:
> Is there a way to compare two strings with search character
>
> like A = "Apple"
> B = "app"
>
> and if user input is "A*" or "a*" or "Ap*" then it will compare equal to
> Both A and B above.


Have a look at the documentation for the 'RegEx' class and/or the 'Like'
operator.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
comparing strings JohnE Microsoft Access Form Coding 3 2nd Apr 2009 10:25 PM
Re: Comparing Strings John Vinson Microsoft Access Form Coding 0 7th Jun 2004 09:57 PM
help with comparing strings.... Paul M Microsoft VB .NET 3 24th Feb 2004 06:10 PM
Comparing strings Dennieku Microsoft C# .NET 5 4th Sep 2003 03:17 AM
Comparing strings Dennieku Microsoft Dot NET 5 4th Sep 2003 03:17 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:14 AM.