Name
tuple_regexp_testtuple_regexp_testTupleRegexpTesttuple_regexp_testTupleRegexpTestTupleRegexpTest — Test if a string matches a regular expression.
tuple_regexp_testtuple_regexp_testTupleRegexpTesttuple_regexp_testTupleRegexpTestTupleRegexpTest applies the regular expression in
ExpressionExpressionExpressionExpressionExpressionexpression to one or more input strings in DataDataDataDataDatadata,
and returns the number of matching strings in NumMatchesNumMatchesNumMatchesNumMatchesNumMatchesnumMatches.
In particular, the result for a single input string will be 1
in case of a match, and 0 otherwise.
Please refer to the documentation of tuple_regexp_matchtuple_regexp_matchTupleRegexpMatchtuple_regexp_matchTupleRegexpMatchTupleRegexpMatch for syntax
and options of regular expressions. Additionally, tuple_regexp_testtuple_regexp_testTupleRegexpTesttuple_regexp_testTupleRegexpTestTupleRegexpTest
supports the option 'invert_match'"invert_match""invert_match""invert_match""invert_match""invert_match", which causes those input strings
to be counted which do not match the regular expression.
For convenient use in conditional
expressions, this functionality is also available as the
'=~'"=~""=~""=~""=~""=~" operation in HDevelop.
Exception: Empty input tuple
If the input tuple is empty, the operator returns 0.
HDevelop In-line Operation
HDevelop provides an in-line operation for tuple_regexp_testtuple_regexp_testTupleRegexpTesttuple_regexp_testTupleRegexpTestTupleRegexpTest,
which can be used in an expression in the following syntax:
NumMatches := regexp_test(Data, Expression)
or
NumMatches := Data =~ Expression
- Multithreading type: independent (runs in parallel even with exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Regular expression.
Default value:
'.*'
".*"
".*"
".*"
".*"
".*"
Suggested values: '.*'".*"".*"".*"".*"".*", 'invert_match'"invert_match""invert_match""invert_match""invert_match""invert_match", '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"
Number of matching strings
tuple_regexp_test ('p10662599755', '[A-Z]*', Result)
* Returns 0
tuple_regexp_test ('p10662599755', ['[A-Z]*','ignore_case'], Result)
* Returns 1
tuple_strstrtuple_strstrTupleStrstrtuple_strstrTupleStrstrTupleStrstr
tuple_regexp_matchtuple_regexp_matchTupleRegexpMatchtuple_regexp_matchTupleRegexpMatchTupleRegexpMatch,
tuple_regexp_replacetuple_regexp_replaceTupleRegexpReplacetuple_regexp_replaceTupleRegexpReplaceTupleRegexpReplace,
tuple_regexp_selecttuple_regexp_selectTupleRegexpSelecttuple_regexp_selectTupleRegexpSelectTupleRegexpSelect
Foundation