in reply to Find Not Working

This regular expression:

m/^\s{32}\S\s$find/

...can match only at the beginning of a string because of the ^ metacharacter -- an anchor that matches only at the start of a string, or a line if the /m modifier is in use.

This subpattern:

qr/^(?:H0|HT)/

...can match only at the beginning of a string because it starts with the ^ metacharacter. But you are embedding $find at a position within the consuming pattern that cannot be at the beginning of the string. Consequently there is no string that could match.

At minimum, you probably should remove the ^ metacharacter from the embedded subpattern.

Also, this: /(?:H0|HT)/ might be more clearly written as /H[0T]/.


Dave