Using index(), I can find out if a string contains a specified substring.
Similarly, I can use a regular expression test to find out if a string
matches a particular pattern.  What I'm LOOKING FOR is a way to find out
if a string matches a particular "wild card" character sequence, as used
in glob(), etc.  For example:

  if (wcm($string, '/{foo,bar}.h') { ...

should match both

  $string = '/etc/bar.h';
  $string = '/usr/bar.h';

but not

  $string = '/etc/baz.h;

I suspect that I could munge the wild card expressions into REs, but I'm
hoping someone has already done this (or developed an alternative).

Help?

-r
--
email: [EMAIL PROTECTED]; phone: +1 650-873-7841
http://www.cfcl.com        - Canta Forda Computer Laboratory
http://www.cfcl.com/Meta   - The FreeBSD Browser, Meta Project, etc.

Reply via email to