camonitor_sort.pl: Support inverse regexp matches.
patch 5efecc1f633add866526b66ffba00e12e0d723fa
Author: Goetz.Pfeiffer@helmholtz-berlin.de
Date: Fri Mar 25 22:20:17 CET 2022
* camonitor_sort.pl: Support inverse regexp matches.
hunk ./bin/camonitor_sort.pl 97
+ my $invert= 0;
hunk ./bin/camonitor_sort.pl 101
+ if ($regexp =~ /^!(.*)/)
+ { [_$_]
+ $regexp= $1;
+ $invert= 1;
+ }
+
hunk ./bin/camonitor_sort.pl 111
- eval("sub $funcname { return(\$_[0]=~ $regexp); }");
+ if (!$invert)
+ {
+ eval("sub $funcname { return(\$_[0]=~ $regexp); }");
+ }
+ else
+ {
+ eval("sub $funcname { return(\$_[0]!~ $regexp); }");
+ }
hunk ./bin/camonitor_sort.pl 231
+ Note: every regexp that starts with '!' is a "do not match" regexp. In this
+ case theresults are the ones that DO NOT match.
+