G'day fazedandconfused,
The regex you show (i.e. ([A-Z.]*BO)<br>) matches nothing!
To match all lines containing a string ending ".BO", you could use a regex like this:
qr{ : ( .*? \. BO \b ) }x
This captures:
DI.CATALOGUE.ITEM.IMPORT.BO
DI.PRODUCT.HIERARCHY.IMPORT.BO
DI.CATSETUP.PRODUCT.IMPORT.BO
ATP.CANCEL.PARCEL.CONFIRM.EXPORT.BO
ATP.DELIVERY.DEFINITION.EXPORT.BO
ATP.FOREIGN.PARCEL.EXPORT.BO
ATP.PARCEL.DESPATCH.EXPORT.BO
For your data, consider capturing your "most situations" strings (as shown above) and then, separately, excluding your "particular requirement" lines.
This should provide more flexibility by allowing you to conditionally include a (possibly variable) "particular requirement" regex.
Here's my test:
#!/usr/bin/env perl -l
use strict;
use warnings;
my $most_situations_re = qr{ : ( .*? \. BO \b ) }x;
my $particular_requirement_exclude_re = qr{ PRODUCT }x;
while (<DATA>) {
next unless /$most_situations_re/;
my $capture = $1;
next if $capture =~ /$particular_requirement_exclude_re/;
print $capture;
}
__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)
Output:
DI.CATALOGUE.ITEM.IMPORT.BO
ATP.CANCEL.PARCEL.CONFIRM.EXPORT.BO
ATP.DELIVERY.DEFINITION.EXPORT.BO
ATP.FOREIGN.PARCEL.EXPORT.BO
ATP.PARCEL.DESPATCH.EXPORT.BO
"This is where my knowledge of regular expression lets me down ..."
I don't know your level of regex knowledge.
One or more of these should help: