RegExp for matching three letters, but not text “BUY”

前端 未结 2 1203
你的背包
你的背包 2021-02-05 01:36

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

2条回答
  •  灰色年华
    2021-02-05 01:48

    You can use a negative look-behind assertion to verify that the text just matched does not equal BUY.

    [A-Z]{3}(?

提交回复
热议问题