in reply to look-ahead and look behind!!

You are using .* in your lookbehind, which can match a string of arbitrary length. This is not implemented in the regex engine.

As to the send question: you could use m/(?<=a\w{2})12/ instead. The lookbehind starts from the current position in the string, not from the start of the regex match. Which mean that the two \w match "12", and there is an "x" where the regex engine searches for an "a". Hence there is no match.