-module(test).
-export([test/0]).

test() ->
	try re:run("abc", "b", [{capture, first}]) of
  		{match, [{1-1, Len}]}  -> Len;
		{match, [{St, Len}]} -> use(St+1, Len);
		nomatch              -> ok
	catch
	      error:badarg         -> throw("Error: " ++ lists:flatten("Bad Regular Expression"))
	end.

use(_A,_B) ->
	ok.
