Name
tuple_regexp_selecttuple_regexp_selectTupleRegexpSelecttuple_regexp_selectTupleRegexpSelectTupleRegexpSelect — Select tuple elements matching a regular expression.
tuple_regexp_selecttuple_regexp_selectTupleRegexpSelecttuple_regexp_selectTupleRegexpSelectTupleRegexpSelect applies the regular expression in
ExpressionExpressionExpressionExpressionExpressionexpression to one or more input strings in DataDataDataDataDatadata,
and returns the matching string elements in SelectionSelectionSelectionSelectionSelectionselection. This
is convenient, e.g., for filtering a list of files obtained using
the operator list_fileslist_filesListFileslist_filesListFilesListFiles.
Please refer to the documentation of tuple_regexp_matchtuple_regexp_matchTupleRegexpMatchtuple_regexp_matchTupleRegexpMatchTupleRegexpMatch for syntax
and options of regular expressions. Additionally, tuple_regexp_selecttuple_regexp_selectTupleRegexpSelecttuple_regexp_selectTupleRegexpSelectTupleRegexpSelect
supports the option 'invert_match'"invert_match""invert_match""invert_match""invert_match""invert_match", which causes those input strings
to be selected which do not match the regular expression.
Exception: Empty input tuple
If the input tuple is empty, the operator returns an empty tuple.
HDevelop In-line Operation
HDevelop provides an in-line operation for tuple_regexp_selecttuple_regexp_selectTupleRegexpSelecttuple_regexp_selectTupleRegexpSelectTupleRegexpSelect,
which can be used in an expression in the following syntax:
Selection := regexp_select(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"
tuple_regexp_select (['.','..','mydir','a.png','b.txt','c.bmp','d.dat'], \
'.(bmp|png)', Result)
* Returns ['a.png','c.bmp']
tuple_regexp_select (Files, ['training','invert_match'], Matches)
* Returns all file names that do *not* contain the string 'training'
tuple_selecttuple_selectTupleSelecttuple_selectTupleSelectTupleSelect
tuple_regexp_matchtuple_regexp_matchTupleRegexpMatchtuple_regexp_matchTupleRegexpMatchTupleRegexpMatch,
tuple_regexp_replacetuple_regexp_replaceTupleRegexpReplacetuple_regexp_replaceTupleRegexpReplaceTupleRegexpReplace,
tuple_regexp_testtuple_regexp_testTupleRegexpTesttuple_regexp_testTupleRegexpTestTupleRegexpTest
Foundation