diff options
author | Ingela Anderton Andin <[email protected]> | 2016-01-28 15:44:15 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2016-01-28 16:13:58 +0100 |
commit | ba8d87765f490d99c9768dd116bb1a2e75354cc6 (patch) | |
tree | 90e4628f32237d9529b997b0380c1bea1c2775d8 /lib/inets/src/http_lib | |
parent | 1523be48ab4071b158412f4b06fe9c8d6ba3e73c (diff) | |
download | otp-ba8d87765f490d99c9768dd116bb1a2e75354cc6.tar.gz otp-ba8d87765f490d99c9768dd116bb1a2e75354cc6.tar.bz2 otp-ba8d87765f490d99c9768dd116bb1a2e75354cc6.zip |
inets: Use re instead of inets_regexp
Diffstat (limited to 'lib/inets/src/http_lib')
-rw-r--r-- | lib/inets/src/http_lib/http_uri.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/inets/src/http_lib/http_uri.erl b/lib/inets/src/http_lib/http_uri.erl index 79591eec29..bd8ca5f489 100644 --- a/lib/inets/src/http_lib/http_uri.erl +++ b/lib/inets/src/http_lib/http_uri.erl @@ -179,10 +179,10 @@ parse_host_port(_Scheme, DefaultPort, HostPort, _Opts) -> {Host, int_port(Port)}. split_uri(UriPart, SplitChar, NoMatchResult, SkipLeft, SkipRight) -> - case inets_regexp:first_match(UriPart, SplitChar) of - {match, Match, _} -> - {string:substr(UriPart, 1, Match - SkipLeft), - string:substr(UriPart, Match + SkipRight, length(UriPart))}; + case re:run(UriPart, SplitChar, [{capture, first}]) of + {match, [{Match, _}]} -> + {string:substr(UriPart, 1, Match + 1 - SkipLeft), + string:substr(UriPart, Match + 1 + SkipRight, length(UriPart))}; nomatch -> NoMatchResult end. |