hiwa のメッセージ:
> ranumehta79@gmail.com のメッセージ:
>
[quoted text clipped - 24 lines]
> }
> }
or,
System.out.println(text.replaceAll("(?:abc){2,}", "def"));
Jeffrey Schwab - 31 Jul 2006 23:07 GMT
> hiwa のメッセージ:
>
[quoted text clipped - 28 lines]
> or,
> System.out.println(text.replaceAll("(?:abc){2,}", "def"));
For clarity to the OP: This version replaces multiple occurrences, but
not a stand-alone occurrence. E.g., XabcabcX becomes XdefX, but XabcX
remains XabcX.