By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,573 Members | 1,824 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,573 IT Pros & Developers. It's quick & easy.

Comparing Strings

P: n/a
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

Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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" <br***@telcorinc.com> wrote in message
news:3f***********************@news.newshosting.co m... 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

Nov 20 '05 #2

P: n/a
* "Brij Singh" <br***@telcorinc.com> 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>
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.