in reply to Re^2: regular expression to match specific members of a bus_name
in thread regular expression to match specific members of a bus_name
But even if you did not know about zero-width assertions, you could still have obtained more or less the same resukt with an alternation:my $regex = qr/\w{3}_[tr]x_[pn]\d(?!\d)/;
which means: match everything to the required digit, followed by either a non-digit or the end of the string.my $regex = qr/\w{3}_[tr]x_[pn]\d(\D|$)/;
TIMTOWTDI.
|
|---|