Please support RegExLib Sponsors
.NET Engine Client-side Engine Silverlight Tester
Source Regular 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)
Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials