Awesome
RFC3966
A Tel URI parser trying to be strictly compatible with RFC3966.
This project uses ex_abnf with the official uri grammar
Example
iex> RFC3966.init # Call this one first to initialize the grammar.
iex> {_matched_tel, _not_matched_input, result} = RFC3966.parse 'tel:+1-201-555-0123;param1;param2=value'
iex> result
%RFC3966.Result{
context: nil,
descriptor: nil,
ext: nil,
global: true,
isub: nil,
local: false,
number: '+1-201-555-0123',
params: %{'param1' => nil, 'param2' => 'value'}
}
Using it with Mix
To use it in your Mix projects, first add it as a dependency:
def deps do
[{:ex_rfc3966, "~> 0.2.4"}]
end
Then run mix deps.get to install it.
License
The source code is released under Apache 2 License.
Check LICENSE file for more information.