Displaying page
of
pages;
Items to
Title |
Test
Details
Pattern Title
|
Expression |
^(?<toplevel>[a-z]+) # Matches the top level MIME type, e.g. 'text'
# in 'text/html'
/(?<subtype>[a-z]+) # Matches the sub type, e.g. 'html' in 'text/html'
(\+(?<formattype>[a-z]+))? # Matches the format type, e.g. 'xml' in
# 'application/xhtml+xml'
# (Optional part of the MIME type)
(; *?charset="?(?<charset>[a-z0-9\-]+)"?)?$ # matches the 'charset'
# parameter in the MIME type, e.g. 'iso-8859-1'
# in 'text/html; charset=iso-8859-1'
# (Optional part of the MIME type)
|
Description |
Matches MIME Media Types, often to be seen in HTTP
'Content-Type' headers. Extracts the top level type, sub type, format type and charset parameter and assigns them to their respective group in the expression.
|
Matches |
text/html | application/xhtml+xml
|
Non-Matches |
text
|
Author |
Rating:
Not yet rated.
Asbjørn Ulsberg
|
Displaying page
of
pages;
Items to