Class RegexScalars
Centralizes all Regex strings
public static class RegexScalars
- Inheritance
-
RegexScalars
- Inherited Members
Fields
AllCharactersInQuotes
Regex pattern
public const string AllCharactersInQuotes = "([\"'])(?:(?=(\\\\?))\\2.)*?\\1"
Field Value
AllCharactersIndicatingParentDirectory
Regex pattern
public const string AllCharactersIndicatingParentDirectory = "\\.\\./|\\.\\.\\\\"
Field Value
AllCharactersNotAlphanumeric
Regex pattern
public const string AllCharactersNotAlphanumeric = "[^a-z^0-9]"
Field Value
AllCharactersNotNumeric
Regex pattern
public const string AllCharactersNotNumeric = "\\D"
Field Value
AllSpaceCharactersRepeatedTwoOrMoreTimes
Regex pattern
public const string AllSpaceCharactersRepeatedTwoOrMoreTimes = " {2,}"
Field Value
AllThatLooksLikeEmailAddress
Regex pattern
public const string AllThatLooksLikeEmailAddress = "\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"
Field Value
AllThatLooksLikeUnc
Regex pattern
public const string AllThatLooksLikeUnc = "^(\\\\(\\\\[^\\s\\\\]+)+|([A-Za-z]:(\\\\)?|[A-z]:(\\\\[^\\s\\\\]+)+))(\\\\)?$"
Field Value
AllThatLooksLikeXmlMarkup
Regex pattern
public const string AllThatLooksLikeXmlMarkup = "<\\s*([^>]+)\\s*>"
Field Value
AllThatLooksLikeXmlSelfClosingTags
Regex pattern
public const string AllThatLooksLikeXmlSelfClosingTags = "<([^>]+)/>"
Field Value
AllWords
Regex pattern
public const string AllWords = "\\w+"
Field Value
CommandLineArgumentInQuotesFollowedByOtherArguments
Regex pattern
public const string CommandLineArgumentInQuotesFollowedByOtherArguments = "\"[^\"]+\"|\\s+.+"
Field Value
HtmlAttributesWithoutQuotes
Regex pattern
public const string HtmlAttributesWithoutQuotes = "\\s([^'\\\"\\s]+)(\\s*=\\s*)([^'\\\"\\s]+)\\s"
Field Value
HtmlClosingTagCharacters
Regex pattern
public const string HtmlClosingTagCharacters = "\\<\\s*/"
Field Value
HtmlElementsThatShouldNotBeMinimized
Regex pattern
public const string HtmlElementsThatShouldNotBeMinimized = "<(a|iframe|td|th|script)\\s+([^>]*)(/>)"
Field Value
HtmlHrefOrSrcAttributes
Regex pattern
public const string HtmlHrefOrSrcAttributes = "(href|src)\\s*=\\s*['\"][^\"]+['\"]"
Field Value
HtmlStartTags
Regex pattern
public const string HtmlStartTags = "<[^>\\/]+>"
Field Value
HtmlTagContents
Regex pattern
public const string HtmlTagContents = "<[^/][^>]*>"
Field Value
HtmlTagWithAnyAttributes
Regex pattern
public const string HtmlTagWithAnyAttributes = "<html [^>]*>"
Field Value
XhtmlAttribute
Regex pattern
public const string XhtmlAttribute = "\\s+(.+)\\s*=\\s*\"\\1\""
Field Value
Remarks
This expression intends to match XHTML-style attributes like foo="foo"
XhtmlDocTypeDeclaration
Regex pattern
public const string XhtmlDocTypeDeclaration = "\\<\\!DOCTYPE [^<]+\\>"
Field Value
XhtmlEndTagsThatShouldBeMinimized
Regex pattern
public const string XhtmlEndTagsThatShouldBeMinimized = "\\s*</(base|isindex|link|meta)\\s*>"
Field Value
XhtmlMinimizedEndChars
Regex pattern
public const string XhtmlMinimizedEndChars = "\\s*/>"
Field Value
XhtmlSelfClosingTags
Regex pattern
public const string XhtmlSelfClosingTags = "<\\s*(br|hr|img|link|meta)([^>]*)(>)"
Field Value
XmlNamedEntities
Regex pattern
public const string XmlNamedEntities = "\\&\\w+\\;"
Field Value
XmlNamespaceAttributes
Regex pattern
public const string XmlNamespaceAttributes = "\\s*xmlns\\s*=\\s*\"[^\"]+\"\\s*"
Field Value
XmlNamespaceDeclarations
Regex pattern
public const string XmlNamespaceDeclarations = "\\s*(xmlns:?[^=]*=[\"][^\"]*[\"])\\s*"
Field Value
XmlNamespacePrefixes
Regex pattern
public const string XmlNamespacePrefixes = "\\s*xmlns:?([^=]*)=[\"][^\"]*[\"]\\s*"
Field Value
XmlNamespaceSchemaLocationAttributes
Regex pattern
public const string XmlNamespaceSchemaLocationAttributes = "\\s*([a-zA-z0-9:]*schemaLocation\\s*=[\"][^\"]*[\"])\\s*"
Field Value
XmlNumericEntities
Regex pattern
public const string XmlNumericEntities = "\\&\\#\\d+\\;"