Replace()
Regex::Replace(const String&, const String&) method
Replaces all matches of regex in string with replacement string.
String System::Text::RegularExpressions::Regex::Replace(const String &input, const String &replacement)
Arguments
Parameter | Type | Description |
---|---|---|
input | const String& | Input string. |
replacement | const String& | Replacement string. |
Return Value
Input string with all regex matches replaced with replacement string.
Regex::Replace(const String&, const char_t *) method
Replaces all matches of regex in string with replacement string.
String System::Text::RegularExpressions::Regex::Replace(const String &input, const char_t *replacement)
Arguments
Parameter | Type | Description |
---|---|---|
input | const String& | Input string. |
replacement | const char_t * | Replacement string. |
Return Value
Input string with all regex matches replaced with replacement string.
Regex::Replace(const String&, const MatchEvaluator&) method
Replaces all matches in string with delegate-generated replacement strings.
String System::Text::RegularExpressions::Regex::Replace(const String &input, const MatchEvaluator &evaluator)
Arguments
Parameter | Type | Description |
---|---|---|
input | const String& | Input string. |
evaluator | const MatchEvaluator& | Delegate to generate replacement strings based on matches. |
Return Value
Input strings with all matches replaced.
Regex::Replace(const String&, const MatchEvaluator&, int) method
Replaces all matches in string with delegate-generated replacement strings.
String System::Text::RegularExpressions::Regex::Replace(const String &input, const MatchEvaluator &evaluator, int count)
Arguments
Parameter | Type | Description |
---|---|---|
input | const String& | Input string. |
evaluator | const MatchEvaluator& | Delegate to generate replacement strings based on matches. |
count | int | Number of replacements limit. |
Return Value
Input strings with all matches replaced.
Regex::Replace(const String&, const MatchEvaluator&, int, int) method
Replaces all matches in string with delegate-generated replacement strings.
String System::Text::RegularExpressions::Regex::Replace(const String &input, const MatchEvaluator &evaluator, int count, int startat)
Arguments
Parameter | Type | Description |
---|---|---|
input | const String& | Input string. |
evaluator | const MatchEvaluator& | Delegate to generate replacement strings based on matches. |
count | int | Number of replacements limit. |
startat | int | Index in input string to start replacement at. |
Return Value
Input strings with all matches replaced.
Regex::Replace(const String&, const String&, int) method
Replaces substrings in string. Not implemented.
String System::Text::RegularExpressions::Regex::Replace(const String &input, const String &replacement, int count)
Regex::Replace(const String&, const String&, int, int) method
Replaces substrings in string. Not implemented.
String System::Text::RegularExpressions::Regex::Replace(const String &input, const String &replacement, int count, int startat)
Regex::Replace(const String&, const char_t *, const char_t *) method
Replaces all matches of regex in string with replacement string.
static String System::Text::RegularExpressions::Regex::Replace(const String &input, const char_t *pattern, const char_t *replacement)
Arguments
Parameter | Type | Description |
---|---|---|
input | const String& | Input string. |
pattern | const char_t * | Regex pattern. |
replacement | const char_t * | Replacement string. |
Return Value
Input string with all regex matches replaced with replacement string.
Regex::Replace(const String&, const String&, const char_t *) method
Replaces all matches of regex in string with replacement string.
static String System::Text::RegularExpressions::Regex::Replace(const String &input, const String &pattern, const char_t *replacement)
Arguments
Parameter | Type | Description |
---|---|---|
input | const String& | Input string. |
pattern | const String& | Regex pattern. |
replacement | const char_t * | Replacement string. |
Return Value
Input string with all regex matches replaced with replacement string.
Regex::Replace(const String&, const String&, const MatchEvaluator&, RegexOptions) method
Replaces all matches in string with delegate-generated replacement strings (static function).
static String System::Text::RegularExpressions::Regex::Replace(const String &input, const String &pattern, const MatchEvaluator &evaluator, RegexOptions options)
Arguments
Parameter | Type | Description |
---|---|---|
input | const String& | Input string. |
pattern | const String& | Regex pattern. |
evaluator | const MatchEvaluator& | Delegate to generate replacement strings based on matches. |
options | RegexOptions | Regex options. |
Return Value
Input strings with all matches replaced.
Regex::Replace(const String&, const String&, const String&, RegexOptions) method
Replaces all matches of regex in string with replacement string.
static String System::Text::RegularExpressions::Regex::Replace(const String &input, const String &pattern, const String &replacement, RegexOptions options)
Arguments
Parameter | Type | Description |
---|---|---|
input | const String& | Input string. |
pattern | const String& | Regex pattern. |
replacement | const String& | Replacement string. |
options | RegexOptions | Regex options. |
Return Value
Input string with all regex matches replaced with replacement string.
Regex::Replace(const String&, const String&, const String&) method
Replaces regex matches.
static String System::Text::RegularExpressions::Regex::Replace(const String &input, const String &pattern, const String &replacement)
Arguments
Parameter | Type | Description |
---|---|---|
input | const String& | Input string. |
pattern | const String& | Regexp pattern. |
replacement | const String& | Replacement string. |
Return Value
String with all matches replaced.
Regex::Replace(const String&, const String&, const MatchEvaluator&) method
Replaces regex matches.
static String System::Text::RegularExpressions::Regex::Replace(const String &input, const String &pattern, const MatchEvaluator &evaluator)
Arguments
Parameter | Type | Description |
---|---|---|
input | const String& | Input string. |
pattern | const String& | Regexp pattern. |
evaluator | const MatchEvaluator& | Delegate to generate replacement string for each match. |
Return Value
String with all matches replaced.
See Also
- Enum RegexOptions
- Typedef MatchEvaluator
- Class String
- Class Regex
- Namespace System::Text::RegularExpressions
- Library Aspose.Slides