erlang String = "Hello", Regexp = "[A-Z][a-z]+",
is_match(String, Regexp) andalso (begin io:format("ok~n"), true end).
-module(regxmatch).
-export([start/0]).
start() ->
String = "Hello", Regexp = "[A-Z][a-z]+",
is_match(String, Regexp) andalso (begin io:format("ok~n"), true end).
is_match(String, Regexp) -> case regexp:first_match(String, Regexp) of {match, _, _} -> true ; _ -> false end.