Created
December 20, 2012 17:04
-
-
Save emrox/4346774 to your computer and use it in GitHub Desktop.
Regular Expression for matching META Tags from a HTML Source
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta\s*(?:(?:\b(?:\w|-)+\b\s*)=\s*(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')\s*)*\/?> | |
- empty Meta Tags | |
- XHTML Styled Meta Tags (<meta />) and normal HTML Meta Tags (<meta>) | |
- single and double quote marks are supported | |
- Values can contain escaped quote marks (<meta name="test\"name" />) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment