home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / cplus / 13623 < prev    next >
Encoding:
Text File  |  1992-09-14  |  1.3 KB  |  47 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!portal!ntmtv!ntmtv!bellam
  3. From: bellam@ntmtv.UUCP (Andrea Bell)
  4. Subject: Pattern Matching Algorithm wanted
  5. Message-ID: <1992Sep14.173458.27896@ntmtv>
  6. Originator: bellam@tucana
  7. Sender: news@ntmtv
  8. Nntp-Posting-Host: tucana
  9. Reply-To: bellam@ntmtv.UUCP (Andrea Bell)
  10. Organization: Northern Telecom Inc, Mountain View, CA
  11. Distribution: ba
  12. Date: Mon, 14 Sep 1992 17:34:58 GMT
  13. Lines: 32
  14.  
  15. Greetings,
  16.  
  17. I am looking for a pattern matching algorithm encorporating
  18. wild cards and place holders.  I currently have the Knuth-Morris-
  19. Pratt algorithm for simple pattern matching, but it is not specific 
  20. enough.  I will be using this pattern matching algorithm on strings 
  21. such as the following:
  22.  
  23. 1)    match(415*,variable_number) where:
  24.  
  25.         415, 4141, 4159669097, etc are matches
  26.  
  27. 2)    match(???2447788,variable_number) where:
  28.  
  29.         4082447788, 4152447788, etc are matches
  30.  
  31. 3)     match(4??*,variable_number) where:
  32.  
  33.         415, 408, 4153334444, etc are matches
  34.  
  35. The matching algorithm would be similar to what unix uses
  36. for wild cards and place holders.  If you know of a good 
  37. resource or have an appropriate algorithm, please send it
  38. via email to address: 
  39.  
  40.             Andrea Bell
  41.  
  42. I will send out a reference document of all solutions that are 
  43. returned to me. Thank you.
  44.  
  45. Andrea Bell
  46. Northern Telecom
  47.