public sealed class Regis
A string matching pattern.

Methods

Matches

#
public bool Matches(string text)
Test whether a string matches this pattern.
text (string)String to match against.
True if the string matches.

NextMatch

#
public bool NextMatch(string text, int index, out int start, out int end)
Find the first character which starts a match in the text for this pattern.
text (string)Text to search.
index (int)First character to take into consideration.
start (out int)Index of first character which matches this pattern.
end (out int)Index of last character of matching text block.
True if a match was found.

NextMatch

#
public bool NextMatch(string text, int index, out int start)
Find the first character which starts a match in the text for this pattern.
text (string)Text to search.
index (int)First character to take into consideration.
start (out int)Index of first character which matches this pattern.
True if a match was found.

TryParse

#
public static Regis TryParse(string pattern, out string failure)
Try and parse a string representing a regis pattern.
pattern (string)Pattern to parse.
failure (out string)Error description in case of parsing failure.
Parsed pattern or null.

WithAnyWildcards

#
public Regis WithAnyWildcards(bool leading, bool trailing)
Prepend or append any-wildcards to the pattern.
leading (bool)If true, the pattern will contain a leading any-wildcard.
trailing (bool)If true, the pattern will contain a trailing any-wildcard.
Modified pattern.

WithCaseInsensitive

#
public Regis WithCaseInsensitive()
Add an initial case-insensitive instruction to the pattern.
Modified pattern.

WithCaseSensitive

#
public Regis WithCaseSensitive()
Add an initial case-sensitive instruction to the pattern.
Modified pattern.