Class Matcher
Namespace:Microsoft.DocAsCode.MarkdownLite.Matchers
Assembly:Microsoft.DocAsCode.MarkdownLite.dll
Syntax
public abstract class Matcher
Fields
NotMatch
Declaration
public const int NotMatch = -1
Field Value
Properties
AnyChar
Declaration
public static Matcher AnyChar { get; }
Property Value
AnyStringInSingleLine
Declaration
public static Matcher AnyStringInSingleLine { get; }
Property Value
AnyStringInSingleLineOrEmpty
Declaration
public static Matcher AnyStringInSingleLineOrEmpty { get; }
Property Value
AnyWordCharacter
Declaration
public static Matcher AnyWordCharacter { get; }
Property Value
EndOfString
Declaration
public static Matcher EndOfString { get; }
Property Value
NewLine
Declaration
public static Matcher NewLine { get; }
Property Value
WhiteSpace
Declaration
public static Matcher WhiteSpace { get; }
Property Value
WhiteSpaces
Declaration
public static Matcher WhiteSpaces { get; }
Property Value
WhiteSpacesOrEmpty
Declaration
public static Matcher WhiteSpacesOrEmpty { get; }
Property Value
WordBoundary
Declaration
public static Matcher WordBoundary { get; }
Property Value
Methods
Any(Matcher[])
Declaration
public static Matcher Any(params Matcher[] matchers)
Parameters
Type |
Name |
Description |
Matcher[] |
matchers |
|
Returns
AnyCharIn(Char[])
Declaration
public static Matcher AnyCharIn(params char[] ch)
Parameters
Type |
Name |
Description |
Char[] |
ch |
|
Returns
AnyCharInRange(Char, Char)
Declaration
public static Matcher AnyCharInRange(char start, char end)
Parameters
Type |
Name |
Description |
Char |
start |
|
Char |
end |
|
Returns
AnyCharNot(Char)
Declaration
public static Matcher AnyCharNot(char ch)
Parameters
Type |
Name |
Description |
Char |
ch |
|
Returns
AnyCharNotIn(Char[])
Declaration
public static Matcher AnyCharNotIn(params char[] ch)
Parameters
Type |
Name |
Description |
Char[] |
ch |
|
Returns
BackReference(String)
Declaration
public static Matcher BackReference(string groupName)
Parameters
Type |
Name |
Description |
String |
groupName |
|
Returns
CaptureGroup(String, Matcher)
Declaration
public static Matcher CaptureGroup(string name, Matcher matcher)
Parameters
Returns
CaseInsensitiveString(String)
Declaration
public static Matcher CaseInsensitiveString(string text)
Parameters
Type |
Name |
Description |
String |
text |
|
Returns
Char(Char)
Declaration
public static Matcher Char(char ch)
Parameters
Type |
Name |
Description |
Char |
ch |
|
Returns
CompareLength(Matcher, LengthComparison, String)
Declaration
public static Matcher CompareLength(Matcher inner, LengthComparison comparsion, string groupName)
Parameters
Returns
EscapeText(String)
Declaration
protected string EscapeText(string text)
Parameters
Type |
Name |
Description |
String |
text |
|
Returns
Match(MatchContent)
Declaration
public abstract int Match(MatchContent content)
Parameters
Returns
Type |
Description |
Int32 |
Char count of match, -1 is not match.
|
Maybe(Matcher)
Declaration
public static Matcher Maybe(Matcher matcher)
Parameters
Type |
Name |
Description |
Matcher |
matcher |
|
Returns
NegativeTest(Matcher[])
Declaration
public static Matcher NegativeTest(params Matcher[] matchers)
Parameters
Type |
Name |
Description |
Matcher[] |
matchers |
|
Returns
Repeat(Matcher, Int32)
Declaration
public static Matcher Repeat(Matcher matcher, int minOccur)
Parameters
Returns
Repeat(Matcher, Int32, Int32)
Declaration
public static Matcher Repeat(Matcher matcher, int minOccur, int maxOccur)
Parameters
Returns
ReverseNegativeTest(Matcher[])
Declaration
public static Matcher ReverseNegativeTest(params Matcher[] matchers)
Parameters
Type |
Name |
Description |
Matcher[] |
matchers |
|
Returns
ReverseTest(Matcher[])
Declaration
public static Matcher ReverseTest(params Matcher[] matchers)
Parameters
Type |
Name |
Description |
Matcher[] |
matchers |
|
Returns
Sequence(Matcher[])
Declaration
public static Matcher Sequence(params Matcher[] matchers)
Parameters
Type |
Name |
Description |
Matcher[] |
matchers |
|
Returns
String(String)
Declaration
public static Matcher String(string text)
Parameters
Type |
Name |
Description |
String |
text |
|
Returns
Test(Matcher[])
Declaration
public static Matcher Test(params Matcher[] matchers)
Parameters
Type |
Name |
Description |
Matcher[] |
matchers |
|
Returns
Operators
Addition(Matcher, Matcher)
Declaration
public static Matcher operator +(Matcher left, Matcher right)
Parameters
Returns
Addition(Matcher, Char)
Declaration
public static Matcher operator +(Matcher left, char right)
Parameters
Returns
Addition(Matcher, String)
Declaration
public static Matcher operator +(Matcher left, string right)
Parameters
Returns
BitwiseOr(Matcher, Matcher)
Declaration
public static Matcher operator |(Matcher left, Matcher right)
Parameters
Returns
Explicit(Char to Matcher)
Declaration
public static explicit operator Matcher(char ch)
Parameters
Type |
Name |
Description |
Char |
ch |
|
Returns
Explicit(String to Matcher)
Declaration
public static explicit operator Matcher(string text)
Parameters
Type |
Name |
Description |
String |
text |
|
Returns
Multiply(Matcher, Int32)
Declaration
public static Matcher operator *(Matcher matcher, int count)
Parameters
Returns
Extension Methods