I have two buttons on form, one of the buttons contain currency code (EUR, USD, GBP,CHF,..) and another one - trade direction (BUY or SELL). And some utility recognize buttons b
You can use a negative look-behind assertion to verify that the text just matched does not equal BUY.
[A-Z]{3}(?<!BUY)
^(?!BUY)[A-Z]{3}$
(?!BUY) is negative lookahead that would fail if it matches the regex BUY
(?!BUY)
BUY