implementing wildcard match method
-
I need to implement vfp function which uses * and ? wildcards:
static bool Like( cExpression1, cExpression2)
cExpression1 Specifies the character expression that Like( ) compares with cExpression2. cExpression1 can contain the wildcards such as * and ?. The question mark (?) matches any single character in cExpression2 and the asterisk (*) matches any number of characters. You can mix any number of wildcards in any combination in cExpression1. cExpression2 Specifies the character expression LIKE( ) compares with cExpression1. returns true on wildcards match. How to implement this ?
Andrus
-
I need to implement vfp function which uses * and ? wildcards:
static bool Like( cExpression1, cExpression2)
cExpression1 Specifies the character expression that Like( ) compares with cExpression2. cExpression1 can contain the wildcards such as * and ?. The question mark (?) matches any single character in cExpression2 and the asterisk (*) matches any number of characters. You can mix any number of wildcards in any combination in cExpression1. cExpression2 Specifies the character expression LIKE( ) compares with cExpression1. returns true on wildcards match. How to implement this ?
Andrus
-
I need to implement vfp function which uses * and ? wildcards:
static bool Like( cExpression1, cExpression2)
cExpression1 Specifies the character expression that Like( ) compares with cExpression2. cExpression1 can contain the wildcards such as * and ?. The question mark (?) matches any single character in cExpression2 and the asterisk (*) matches any number of characters. You can mix any number of wildcards in any combination in cExpression1. cExpression2 Specifies the character expression LIKE( ) compares with cExpression1. returns true on wildcards match. How to implement this ?
Andrus
You should look at using regular expressions. Do a search on this site for Expresso, it is a really cool tool for building regular expressions.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
-
You should look at using regular expressions. Do a search on this site for Expresso, it is a really cool tool for building regular expressions.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
Thank you. I found this thread http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/32649965654df408/57ba3e39a6c2711f?lnk=st&q=#57ba3e39a6c2711f[^] which described that using regular expressions is not easy for this. Can yuo provide sample how to use regexps for this ?
Andrus