#!/usr/bin/perl # http://perlmonks.org/?node_id=1143557 use strict; use warnings; while(<DATA>) { print if /^(?!.*(?:DI.PRODUCT.HIERARCHY.IMPORT.BO|DI.CATSETUP.PRODUC +T.IMPORT.BO)).*\.BO /; } __DATA__ red Queue TEST1:DI.CATALOGUE.ITEM.IMPORT.BO has depth 10 (critical: 10 +, warn: 1) red Queue TEST1:DI.PRODUCT.HIERARCHY.IMPORT.BO has depth 20 (critical: + 10, warn: 1) yellow Queue TEST1:DI.CATSETUP.PRODUCT.IMPORT.BO has depth 9 (warn: 1, + critical: 10) green Queue TEST1:ATP.CANCEL.PARCEL.CONFIRM.EXPORT.BO has depth 0 (war +n: 1, critical: 10) green Queue TEST1:ATP.CANCEL.PARCEL.CONFIRM.EXPORT.LQ has depth 0 (war +n: 30, critical: -1) green Queue TEST1:ATP.DELIVERY.DEFINITION.EXPORT.BO has depth 0 (warn: + 1, critical: 10) green Queue TEST1:ATP.DELIVERY.DEFINITION.EXPORT.LQ has depth 0 (warn: + 10, critical: -1) green Queue TEST1:ATP.FOREIGN.PARCEL.EXPORT.BO has depth 0 (warn: 1, c +ritical: 10) green Queue TEST1:ATP.FOREIGN.PARCEL.EXPORT.LQ has depth 0 (warn: 5, c +ritical: -1) green Queue TEST1:ATP.PARCEL.DESPATCH.EXPORT.BO has depth 0 (warn: 1, +critical: 10)
In reply to Re: Regex to match with exclusions
by Anonymous Monk
in thread Regex to match with exclusions
by fazedandconfused
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |