commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <...@savarese.org>
Subject Re: [lang] Wildcard regex
Date Sat, 09 Oct 2010 04:24:07 GMT

In message <AANLkTinLRq7ZQ2EEw8gW6LS+_FemG3UAdFq9urUfcD8Y@mail.gmail.com>, Step
hen Colebourne writes:
>I don't think comons lang has a routine for converting a standard
>wildcard string (with * and ?) to a regex.
>Here is a first suggestion, although I'm sure it can be improved.

Save yourself the wheel reinvention and adapt the GlobCompiler.globToPerl5
function from the now attic'ed ORO:
  http://svn.apache.org/viewvc/jakarta/oro/trunk/src/java/org/apache/oro/text/GlobCompiler.java?view=markup

daniel


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message