| Table of Contents / Tuple / String Operations | Operators |
tuple_regexp_select — Selects tuple elements matching a regular expression.
tuple_regexp_select( : : Data, Expression : Selection)
tuple_regexp_select applies the regular expression in Expression to one or more input strings in Data, and returns the matching string elements in Selection. This is convenient, e.g., for filtering a list of files obtained using the operator list_files.
Please refer to the documentation of tuple_regexp_match for syntax and options of regular expressions. Additionally, tuple_regexp_select supports the option 'invert_match', which causes those input strings to be selected which do not match the regular expression.
Input strings to match.
Regular expression.
Default value: '.*'
Suggested values: '.*', 'invert_match', 'ignore_case', 'multiline', 'dot_matches_all', 'newline_lf', 'newline_crlf', 'newline_cr'
Matching strings
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_regexp_match, tuple_regexp_replace, tuple_regexp_test
Foundation
| Table of Contents / Tuple / String Operations | Operators |
| HALCON Reference Manual 10.0.2 | Copyright © 1996-2011 MVTec Software GmbH |