Name
tuple_regexp_replacetuple_regexp_replaceTupleRegexpReplacetuple_regexp_replaceTupleRegexpReplaceTupleRegexpReplace — Replace a substring using regular expressions.
tuple_regexp_replacetuple_regexp_replaceTupleRegexpReplacetuple_regexp_replaceTupleRegexpReplaceTupleRegexpReplace applies the regular expression in
ExpressionExpressionExpressionExpressionExpressionexpression to one or more input strings in DataDataDataDataDatadata,
and replaces the first matching substring using the ReplaceReplaceReplaceReplaceReplacereplace
expression. For each input string, a processed output string is
returned in ResultResultResultResultResultresult.
Please refer to the documentation of tuple_regexp_matchtuple_regexp_matchTupleRegexpMatchtuple_regexp_matchTupleRegexpMatchTupleRegexpMatch for syntax
and options of regular expressions. Additionally, tuple_regexp_replacetuple_regexp_replaceTupleRegexpReplacetuple_regexp_replaceTupleRegexpReplaceTupleRegexpReplace
supports the option 'replace_all'"replace_all""replace_all""replace_all""replace_all""replace_all", which causes all matches
within each individual string to be replaced.
The ReplaceReplaceReplaceReplaceReplacereplace expression may use the tag
'$0'"$0""$0""$0""$0""$0" to refer to the matched substring in the
input data, '$i'"$i""$i""$i""$i""$i" to refer to the submatch of the
i-th capturing group (for i <= 9), and '$$'"$$""$$""$$""$$""$$" to
refer to the '$'"$""$""$""$""$" literal.
Exception: Empty input tuple
If DataDataDataDataDatadata is an empty tuple, the operator returns an empty tuple. If
ReplaceReplaceReplaceReplaceReplacereplace is an empty tuple and DataDataDataDataDatadata is not empty, an
exception is raised.
HDevelop In-line Operation
HDevelop provides an in-line operation for tuple_regexp_replacetuple_regexp_replaceTupleRegexpReplacetuple_regexp_replaceTupleRegexpReplaceTupleRegexpReplace,
which can be used in an expression in the following syntax:
Result := regexp_replace(Data, Expression, Replace)
- Multithreading type: independent (runs in parallel even with exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Input strings to process.
Regular expression.
Default value:
'.*'
".*"
".*"
".*"
".*"
".*"
Suggested values: '.*'".*"".*"".*"".*"".*", 'replace_all'"replace_all""replace_all""replace_all""replace_all""replace_all", 'ignore_case'"ignore_case""ignore_case""ignore_case""ignore_case""ignore_case", 'multiline'"multiline""multiline""multiline""multiline""multiline", 'dot_matches_all'"dot_matches_all""dot_matches_all""dot_matches_all""dot_matches_all""dot_matches_all", 'newline_lf'"newline_lf""newline_lf""newline_lf""newline_lf""newline_lf", 'newline_crlf'"newline_crlf""newline_crlf""newline_crlf""newline_crlf""newline_crlf", 'newline_cr'"newline_cr""newline_cr""newline_cr""newline_cr""newline_cr"
tuple_regexp_replace(['img10.bmp','img11.bmp','img12.bmp'], \
'img(.*).bmp', 'out$1.txt', Result)
* Returns ['out10.txt','out11.txt','out12.txt']
tuple_regexp_matchtuple_regexp_matchTupleRegexpMatchtuple_regexp_matchTupleRegexpMatchTupleRegexpMatch,
tuple_regexp_testtuple_regexp_testTupleRegexpTesttuple_regexp_testTupleRegexpTestTupleRegexpTest,
tuple_regexp_selecttuple_regexp_selectTupleRegexpSelecttuple_regexp_selectTupleRegexpSelectTupleRegexpSelect
Foundation