urlParse

parse a URL and return its components
11 Downloads
Updated 21 Jun 2021

View License

This small utility is an URI/URL decoder. Given a string, it returns a structure with parts composing the URI, according to https://en.wikipedia.org/wiki/Uniform_Resource_Identifier
A URI syntax is:
  • URI = scheme:[//authority]path[?query][#fragment]
where authority can be [userinfo@]host[:port].
For instance :
url1 = 'https://www.mathworks.com/matlabcentral/fileexchange/?term=example#total_results_az_footer';
res = urlParse(url1);
res =
scheme: 'https:'
authority: '//www.mathworks.com'
path: '/matlabcentral/fileexchange/'
query: '?term=example'
fragment: '#total_results_az_footer'

Cite As

Emmanuel Farhi (2024). urlParse (https://www.mathworks.com/matlabcentral/fileexchange/94545-urlparse), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0