Hello people,
i need to make a small function that parses a string and generate some
values accordingly. I was thinking something like:

fun s = match  s with
| "aaaa" -> ValueA
| "bbbb" -> ValueB

one of this strings is variable and contains substring/subvalues. I
can recognize it because it's wrapped in graph parenthesis: like
"{ foo=aaaa , bar=bbbb }".

It would be nice if the pattern matching could work as a regular
expression matching like

| "{" something "}" -> ...computation of something


Is it possible ? Which is the easiest way to recursively match a
string ?

Now I am watching the Str module..

O ( n )

-- 
You received this message because you are subscribed to the Google Groups 
"ocaml-developer" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/ocaml-developer?hl=en
For other OCaml forums, see http://caml.inria.fr/resources/forums.en.html

Reply via email to