[erlang-questions] regular expressions (again :)

Christian S <>
Wed Dec 13 12:07:33 CET 2006


> > Calling regexp:match or similar functions is too ugly.

Hide them behind a function. We have closures so returning
a function is trivial.

Re = compile("a(b*)a"),
case Re("abba") of
   match ->
      erlang:display("yaaaay!");
   nomatch ->
      erlang:display("boooo!")
end



More information about the erlang-questions mailing list