Using regex to match any character except =

前端 未结 4 1918
离开以前
离开以前 2021-01-07 17:13

I am trying to write a String validation to match any character (regular, digit and special) except =.

Here is what I have written -

    String patt         


        
4条回答
  •  长情又很酷
    2021-01-07 17:23

    If you only want to check for occurence of "=" why don't you use the String indexOf() method?

    if str.indexOf('=')  //...
    

提交回复
热议问题