Skip to content

Commit

Permalink
pref: 正则表达式替换为非捕获组,提高效率[#173]
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkioTomas committed Apr 16, 2023
1 parent 32c6757 commit 8c08ce7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public static boolean isMoney(String money) {

public static boolean hasMoney(String input) {

return input.matches(".*[0-9]+(,[0-9]{3})*(\\.[0-9]{2})?.*");
return input.matches(".*[0-9]+(?:,[0-9]{3})*(\\.[0-9]{2})?.*");
}


Expand Down

0 comments on commit 8c08ce7

Please sign in to comment.