From ad599bf93f1049d3d2fbce9a42ee95f0e7a0df7e Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sun, 11 Jul 2010 18:18:49 +1200 Subject: [PATCH] Switch from regexp to re --- src/rfc4627_jsonrpc_http.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rfc4627_jsonrpc_http.erl b/src/rfc4627_jsonrpc_http.erl index 1462ae1..144a13d 100644 --- a/src/rfc4627_jsonrpc_http.erl +++ b/src/rfc4627_jsonrpc_http.erl @@ -124,8 +124,8 @@ extract_timeout_header(HeadersJsonObj) -> extract_object_and_method(AliasPrefix, Path) -> AliasPrefixRe = "^" ++ AliasPrefix ++ "/", - case regexp:first_match(Path, AliasPrefixRe) of - {match, 1, Length} -> + case re:run(Path, AliasPrefixRe) of + {match, [{0, Length}]} -> ObjectMethod = string:substr(Path, Length + 1), case lists:reverse(string:tokens(ObjectMethod, "/")) of [] -> {<<>>, <<>>};