8000 Update replace-in-string.md · amgm-coder/toBeTopJavaer@32087bb · GitHub
[go: up one dir, main page]

Skip to content

Commit 32087bb

Browse files
authored
Update replace-in-string.md
1 parent 5b54c2e commit 32087bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/basics/java-basic/replace-in-string.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ replaceAll和replaceFirst的区别主要是替换的内容不同,replaceAll是
2424

2525
//使用replaceFirst将第一个数字替换成H
2626
System.out.println(string.replaceFirst("\\d","H"));//abcH23adb23456aa
27-
//使用replaceFirst将所有数字替换成H
28-
System.out.println(string.replaceAll("\\d","H"));//abcHHHadbHHHHHaa
27+
//使用replaceAll将所有数字替换成H
28+
System.out.println(string.replaceAll("\\d","H"));//abcHHHadbHHHHHaa

0 commit comments

Comments
 (0)
0