like operator or match function for strings 
Author Message
 like operator or match function for strings

I need a function "LIKE" working similar to the like operator in VB or
database applications but for Strings e.g.
like("xab","*[u-z]*")
would return true
like("abc","*[u-z]*")
would return false

so I need the *,? and [] (one of) functionality

Thank you
Markus Erfort



Mon, 07 Jul 2003 18:38:05 GMT  
 like operator or match function for strings

Quote:

>I need a function "LIKE" working similar to the like operator in VB or
>database applications but for Strings e.g.
>like("xab","*[u-z]*")
>would return true
>like("abc","*[u-z]*")
>would return false

>so I need the *,? and [] (one of) functionality

You're talking about Regular Expressions. Check at codeguru.com (in
the string section) for a couple of classes that handle REs.

--
Tim Slattery
MS MVP(DTS)



Mon, 07 Jul 2003 21:32:53 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to get String-matching functions...

2. finding the closest match of a string compared to an array of strings

3. Query: Efficient Multiple string matching C Code snippet?

4. how to do match string

5. Home-made string matching algorithm or strstr()

6. Finding matching parentheses in a string

7. pattern matching and string replacement

8. Query: Efficient Multiple string matching C Code snippet?

9. Request for Sample Code in case sensitive pattern matching of string in C

10. Multi-byte characters and string matching

11. STRING MATCHING

12. Wanted: string matching routine

 

 
Powered by phpBB® Forum Software