[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pattern matching strings with regexes



Le Monday 19 Mar 2012 à 22:26:33 (+0100), Thomas Gazagnaire a écrit :
> > if not, anyone any experience with http://mjambon.com/micmatch.html
> > (reference manual at http://mjambon.com/mikmatch-manual.html) which
> > looks like it does roughly what i'm talking about...
> 
> That's indeed to solution I would advise. As far as I remember the
> library is quite good, and I think you can plug quite easily other
> regexp engines (as ocaml-re). 
> 
> It's quite difficult to design a good compilation scheme with active
> patterns, so the OCaml approach is to compile optimally static
> patterns and let the complex things be handled by external libraries.
> That's maybe not  not the better user-experience choice, but it keeps
> the language simple and efficient :-)

I'd also advocate mikmatch. It's quite good an honestly perhaps the best
thing around. I've however experienced some difficulties when you've got
too many nestings of mikmatch pattern matching. Likely some name/scope
clashes between generated hidden values.

Not 100% perfect, but it really improves the user experience. In this
context, I really do not mind the PCRE dependency at all.

-- 
     Guillaume Yziquel



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.