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

test() ->
	case re:run("abc", "b", [global, {capture, first}]) of
        {match, [[{St, Len}]]} -> use(St+1, Len);
        {match, Matches} ->
            [use(St, Len) ||
            {St, Len}<-lists:map(fun([{S, L}]) -> {S+1, L} end, Matches)]
        ;
        nomatch -> [use(St, Len) || {St, Len}<-[]]
end.	

use(A,B) ->
	{A,B}.
