System::Text::RegularExpressions::Regex class
Contents
[
Hide
]Regex class
Regular expression that follows C#-like syntax. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.
class Regex : public System::Object
Methods
Method | Description |
---|---|
static Escape(const String&) | Escapes special characters to use string as part of the pattern. |
get_MatchTimeout() | Gets matching timeout. |
get_Options() | Gets regex options. |
get_RightToLeft() | Checks if matching is done in right-to-left mode. |
IsMatch(const String&, int) | Matches regex against string. |
static IsMatch(const String&, const String&, RegexOptions, TimeSpan, int) | Checks if string matches pattern. |
Match(const String&) | Matches regex against string. |
Match(const String&, int, int) | Matches regex against string. |
static Match(const String&, const String&, RegexOptions, TimeSpan, int, int) | Matches string and pattern. |
Matches(const String&, int) | Gets all matches of regex in given string by matching repeatedly. |
static Matches(const String&, const String&, RegexOptions, TimeSpan, int, int) | Gets all matches between string and pattern. |
Regex() | Constructs empty regexp. |
Regex(const String&) | Constructor. |
Regex(const String&, RegexOptions) | Constructor. |
Regex(const String&, RegexOptions, TimeSpan) | Constructor. |
Replace(const String&, const String&) | Replaces all matches of regex in string with replacement string. |
Replace(const String&, const char_t *) | Replaces all matches of regex in string with replacement string. |
static Replace(const String&, const char_t *, const char_t *) | Replaces all matches of regex in string with replacement string. |
static Replace(const String&, const String&, const char_t *) | Replaces all matches of regex in string with replacement string. |
Replace(const String&, const MatchEvaluator&) | Replaces all matches in string with delegate-generated replacement strings. |
Replace(const String&, const MatchEvaluator&, int) | Replaces all matches in string with delegate-generated replacement strings. |
Replace(const String&, const MatchEvaluator&, int, int) | Replaces all matches in string with delegate-generated replacement strings. |
static Replace(const String&, const String&, const MatchEvaluator&, RegexOptions) | Replaces all matches in string with delegate-generated replacement strings (static function). |
static Replace(const String&, const String&, const String&, RegexOptions) | Replaces all matches of regex in string with replacement string. |
Replace(const String&, const String&, int) | Replaces substrings in string. Not implemented. |
Replace(const String&, const String&, int, int) | Replaces substrings in string. Not implemented. |
static Replace(const String&, const String&, const String&) | Replaces regex matches. |
static Replace(const String&, const String&, const MatchEvaluator&) | Replaces regex matches. |
Split(const String&) | Splits string by regex matches. |
Split(const String&, int) | Splits string by regex matches. |
Split(const String&, int, int) | Splits an input string a specified maximum number of times into an array of substrings, at the positions defined by a regular expression specified in the Regex constructor. The search for the regular expression pattern starts at a specified character position in the input string. |
static Split(const String&, const String&, RegexOptions, TimeSpan) | Splits string by regexp. |
static Split(const String&, const String&, int, RegexOptions, TimeSpan) | Splits string by regexp. |
ToString() const override | Converts regex to string. |
static Unescape(const String&) | Unescapes special characters in string used as part of the pattern. |
Fields
Field | Description |
---|---|
static InfiniteMatchTimeout | Special timeout value to disable match break by timeout. |
See Also
- Class Object
- Namespace System::Text::RegularExpressions
- Library Aspose.PDF for C++