Java REGEX to match an exact number of digits in a string

后端 未结 5 1806
天涯浪人
天涯浪人 2020-12-11 04:19

I tried to find the answer to my problem in the questions history but they just come back in more than one thousand and after scanning through a few tens of matching answers

5条回答
  •  情深已故
    2020-12-11 04:44

    in Javascript console works this. Watch out for \\d:

    replacedString = "rx14ax145N".replace(RegExp("x14(?!\\d)", "g"), "___");
    
    r___ax145N
    

提交回复
热议问题