From: Glenn Jackman Date: 2009-09-10T04:35:20+09:00 Subject: Re: [ANN] Joker -- Wildcards for Ruby At 2009-09-09 01:55PM, "Fabian Streitel" wrote: > [Note: parts of this message were removed to make it a legal post.] > > Hi folks, > I'm proudly presenting: > > # Joker # > > http://karottenreibe.github.com/joker > > Joker is a Wildcard implementation for Ruby. Note that these are known as "glob patterns" -- you might want to update your documentation accordingly (http://en.wikipedia.org/wiki/Glob_pattern) Also, your rdocs seem to be missing a few backslashes: * '?' matches a single character * '*' matches any number of characters, including 0 (1) * '*' matches a literal '*' * '\?' matches a literal '?' (2) * '\' matches a literal '\' 1 should be: '\*' matches a literal '*' 2 should be: '\\' matches a literal '\' You could generalize by saying: * '\x' matches the literal character 'x', even if 'x' is a wildcard character. You haven't implemented bracket expressions: '[cb]at*' should match 'catch' and 'batch' but not 'match' Tcl has had this functionality for years, and it's very handy to be able to do a quick glob comparison on a string when you don't need the full power of a regular expression. (http://www.tcl.tk/man/tcl8.5/TclCmd/string.htm#M40) -- Glenn Jackman Write a wise saying and your name will live forever. -- Anonymous