Using regex to match any character except =

前端 未结 4 1915
离开以前
离开以前 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:35

    If your goal is to not have any = characters in your string, please try the following

    String patternString = "[^=]*";
    

提交回复
热议问题