473,503 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

String matching with wildcards

It's no problem comparing two strings where one contains the "*" wildcard
and find out if eg. "My*" or "*ring" matches "MyString". But how do you go
about comparing two strings where one contains the "?" wildcard to find out
that "My?ring" or "MyStrin?" actually matches "MyString"?

What is the easiest way of doing that?

Cheers,
Johnny J
Sep 25 '07 #1
1 4163
Johnny,

Have a look at regular expressions

http://msdn2.microsoft.com/en-us/lib...ons.regex.aspx

Cor
"Johnny Jörgensen" <jo**@altcom.seschreef in bericht
news:uQ*************@TK2MSFTNGP04.phx.gbl...
It's no problem comparing two strings where one contains the "*" wildcard
and find out if eg. "My*" or "*ring" matches "MyString". But how do you go
about comparing two strings where one contains the "?" wildcard to find
out that "My?ring" or "MyStrin?" actually matches "MyString"?

What is the easiest way of doing that?

Cheers,
Johnny J

Sep 25 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
2376
by: Anon | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello all I am a beginner teaching myself python, and I am enjoying it immensely :) As a language it is great, I real treat to study, I actually...
21
2397
by: Chris S. | last post by:
I have a number of strings, containing wildcards (e.g. 'abc#e#' where # is anything), which I want to match with a test string (e.g 'abcdef'). What would be the best way for me to store my strings...
5
1476
by: William Gill | last post by:
I am using the % operator to create queries for a db app. It works fine when exact strings, or numbers are used, but some queries need partial matching that use the '%' as a wildcards. So for...
1
7001
by: Sea Sharper | last post by:
Hi, C#, from a FileSystemWatcher I would like to catch all files with a *.* filter but then inside the event handler compare against a list of wildcards (eg '*.abc;*.def') Is there anywhere...
1
6660
by: Anandan | last post by:
Hi, This is regarding Dataset Filter: WILDCARD CHARACTERS Both the * and % can be used interchangeably for wildcards in a LIKE comparison. If the string in a LIKE clause contains a * or %,...
5
1752
by: jim_geissman | last post by:
An application filters records based on names found in them. For example, looking through property buyer names, looking for banks and relocation companies. I have a table of names and patterns:...
5
1205
by: Julian | last post by:
I would like some of the fields of a coulmn of one of my report to turn into light red when the field matches a certain string. Julian
1
1848
by: Nitinkcv | last post by:
Hi, I have a textbox and a button. In my textbox i have to enter the query string(say shoes) and on clicking the button takes me to a page show all item related to the search string( in this case...
9
3471
by: bullockbefriending bard | last post by:
i have a large collection of python objects, each of which contains an integer 6-tuple as part of its data payload. what i need to be able to do is select only those objects which meet a simple...
0
10554
NeoPa
by: NeoPa | last post by:
ANSI-89 v ANSI-92 Before we get into all the various types of pattern matching that can be used, there are two ANSI standards used for the main types of wildcard matching (matching zero or more...
0
7074
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7322
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6982
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4667
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3161
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1501
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
374
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.