Need help with Regular Expression to Match Blood Group

前端 未结 5 1152
不知归路
不知归路 2021-01-13 17:06

I\'m trying to come up with a regex that helps me validate a Blood Group field - which should accept only A[+-], B[+-], AB[+-] and O[+-].

Here\'s th

5条回答
  •  失恋的感觉
    2021-01-13 17:33

    For case insensitive within html pattern attribute you may try this

    ([AaBbOo]|[Aa][Bb])[\+-]
    
    
    
    

提交回复
热议问题