A "simple" regex to parse mime types.
Handles all commonly occurring parts of a mime type string such as:
- Type
- Subtype
- Subtype's with an extra extension (e.g. svg+xml) (Optional input)
- Multiple parameters (Optional input)
Tested with:
- application/text
- image/svg+xml
- image/svg;q=0.9,/;q=0.8
- image/svg+xml;q=0.9,/;q=0.8
- application/vnd.uplanet.listcmd-wbxml;charset=utf-8
Submitted by Vespion - 2 years ago (Last modified 2 years ago)