in matcher.replace method,only has: replaceFirst() and replaceAll() two methods i want limit replace 3 times,how to do? example:
matcher.replace
replaceFirst()
replaceAll()
String content="aaaaaaaaaa";
"bbbaaaaaaa"
import java.util.regex.Matcher; import java.util.regex.Pattern; public class T1 { ...
My pattern is OR-like : "word1|word2|word3" I have approximately 800 words. Can it be a problem ?