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

pattern matching strings with regexes

i'm getting the vibe off the interwebs that the answer is "no" but i'll ask 
anyway - is there a standard way to do this in ocaml?  something to the effect 

match s with
| "[hH]ello world!+" -> do_hello

...etc. hopefully you get the idea :)

would be quite helpful if writing eg., webapps.

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...

(anil- don't worry, i don't intend to take another syntax extension dependency 
in at this stage, i'm just asking :) 



This message and any attachment are intended solely for the addressee and may 
contain confidential information. If you have received this message in error, 
please send it back to me, and immediately delete it.   Please do not use, copy 
or disclose the information contained in this message or in any attachment.  
Any views or opinions expressed by the author of this email do not necessarily 
reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.



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