Table of Contents

Class RegexScalars

Namespace
Songhay.Models
Assembly
SonghayCore.dll

Centralizes all Regex strings

public static class RegexScalars
Inheritance
RegexScalars
Inherited Members

Fields

AllCharactersInQuotes

Regex pattern

public const string AllCharactersInQuotes = "([\"'])(?:(?=(\\\\?))\\2.)*?\\1"

Field Value

string

AllCharactersIndicatingParentDirectory

Regex pattern

public const string AllCharactersIndicatingParentDirectory = "\\.\\./|\\.\\.\\\\"

Field Value

string

AllCharactersNotAlphanumeric

Regex pattern

public const string AllCharactersNotAlphanumeric = "[^a-z^0-9]"

Field Value

string

AllCharactersNotNumeric

Regex pattern

public const string AllCharactersNotNumeric = "\\D"

Field Value

string

AllSpaceCharactersRepeatedTwoOrMoreTimes

Regex pattern

public const string AllSpaceCharactersRepeatedTwoOrMoreTimes = " {2,}"

Field Value

string

AllThatLooksLikeEmailAddress

Regex pattern

public const string AllThatLooksLikeEmailAddress = "\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"

Field Value

string

AllThatLooksLikeUnc

Regex pattern

public const string AllThatLooksLikeUnc = "^(\\\\(\\\\[^\\s\\\\]+)+|([A-Za-z]:(\\\\)?|[A-z]:(\\\\[^\\s\\\\]+)+))(\\\\)?$"

Field Value

string

AllThatLooksLikeXmlMarkup

Regex pattern

public const string AllThatLooksLikeXmlMarkup = "<\\s*([^>]+)\\s*>"

Field Value

string

AllThatLooksLikeXmlSelfClosingTags

Regex pattern

public const string AllThatLooksLikeXmlSelfClosingTags = "<([^>]+)/>"

Field Value

string

AllWords

Regex pattern

public const string AllWords = "\\w+"

Field Value

string

CommandLineArgumentInQuotesFollowedByOtherArguments

Regex pattern

public const string CommandLineArgumentInQuotesFollowedByOtherArguments = "\"[^\"]+\"|\\s+.+"

Field Value

string

HtmlAttributesWithoutQuotes

Regex pattern

public const string HtmlAttributesWithoutQuotes = "\\s([^'\\\"\\s]+)(\\s*=\\s*)([^'\\\"\\s]+)\\s"

Field Value

string

HtmlClosingTagCharacters

Regex pattern

public const string HtmlClosingTagCharacters = "\\<\\s*/"

Field Value

string

HtmlElementsThatShouldNotBeMinimized

Regex pattern

public const string HtmlElementsThatShouldNotBeMinimized = "<(a|iframe|td|th|script)\\s+([^>]*)(/>)"

Field Value

string

HtmlHrefOrSrcAttributes

Regex pattern

public const string HtmlHrefOrSrcAttributes = "(href|src)\\s*=\\s*['\"][^\"]+['\"]"

Field Value

string

HtmlStartTags

Regex pattern

public const string HtmlStartTags = "<[^>\\/]+>"

Field Value

string

HtmlTagContents

Regex pattern

public const string HtmlTagContents = "<[^/][^>]*>"

Field Value

string

HtmlTagWithAnyAttributes

Regex pattern

public const string HtmlTagWithAnyAttributes = "<html [^>]*>"

Field Value

string

XhtmlAttribute

Regex pattern

public const string XhtmlAttribute = "\\s+(.+)\\s*=\\s*\"\\1\""

Field Value

string

Remarks

This expression intends to match XHTML-style attributes like foo="foo"

XhtmlDocTypeDeclaration

Regex pattern

public const string XhtmlDocTypeDeclaration = "\\<\\!DOCTYPE [^<]+\\>"

Field Value

string

XhtmlEndTagsThatShouldBeMinimized

Regex pattern

public const string XhtmlEndTagsThatShouldBeMinimized = "\\s*</(base|isindex|link|meta)\\s*>"

Field Value

string

XhtmlMinimizedEndChars

Regex pattern

public const string XhtmlMinimizedEndChars = "\\s*/>"

Field Value

string

XhtmlSelfClosingTags

Regex pattern

public const string XhtmlSelfClosingTags = "<\\s*(br|hr|img|link|meta)([^>]*)(>)"

Field Value

string

XmlNamedEntities

Regex pattern

public const string XmlNamedEntities = "\\&\\w+\\;"

Field Value

string

XmlNamespaceAttributes

Regex pattern

public const string XmlNamespaceAttributes = "\\s*xmlns\\s*=\\s*\"[^\"]+\"\\s*"

Field Value

string

XmlNamespaceDeclarations

Regex pattern

public const string XmlNamespaceDeclarations = "\\s*(xmlns:?[^=]*=[\"][^\"]*[\"])\\s*"

Field Value

string

XmlNamespacePrefixes

Regex pattern

public const string XmlNamespacePrefixes = "\\s*xmlns:?([^=]*)=[\"][^\"]*[\"]\\s*"

Field Value

string

XmlNamespaceSchemaLocationAttributes

Regex pattern

public const string XmlNamespaceSchemaLocationAttributes = "\\s*([a-zA-z0-9:]*schemaLocation\\s*=[\"][^\"]*[\"])\\s*"

Field Value

string

XmlNumericEntities

Regex pattern

public const string XmlNumericEntities = "\\&\\#\\d+\\;"

Field Value

string