Permalink
Browse files

Switch from regexp to re

  • Loading branch information...
1 parent c8c0610 commit ad599bf93f1049d3d2fbce9a42ee95f0e7a0df7e @tonyg committed Jul 11, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 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
[] -> {<<>>, <<>>};

0 comments on commit ad599bf

Please sign in to comment.