![]() | ![]() | ![]() | Regular Expressions |
Instead of selecting a monitor using name alone we can match the most recent version of the file matching a given regular regular expression using RSR_MONITOR_REGEXP. From all matching filenames the one chosen is
For example:
Example: regexp =
^file(\
d\
d\
d\
d)a
is interpreted as
the beginning of the string:
^file(\
d\
d\
d\
d)a,
followed by the string "file":
^file(\
d\
d\
d\
d)a,
followed by a capture:
^file(\
d\
d\
d\
d)a
of four digits:
^file(\
d\
d\
d\
d)a
finally followed by an "a":
^file(\
d\
d\
d\
d)a.
That is the regexp matches the files
file0000a,
file0000abc,
file1234abc and
file1234avc
but not
other_file or
file0000b or
file1234 or
file000x.
Of the matches both
file1234abc and
file1234avc
match the last capture, (\d\d\d\d)
, with "1234" which is
greater than the "0000" of the other files. Thus the file chosen will
be the most recently modified of these two files.
![]() | ![]() | ![]() | Regular Expressions |