G
Gaurav
Hi all,
I am having a problem with the replaceAll(str1,str2) method in java.
I am actually taking a substring from a user input, parsing it and then
I am doing:
userInput = userInput.replaceAll(str1,str2)
where str1 = some substring from user input
str2 = return value from someFunction(str1)
This works fine when user input does not contain parenthesis or any
other java.util.regex special characters. My code stops working in
case of regex special characters and I get str1 as the output of
replaceAll.
TIA
Gaurav
I am having a problem with the replaceAll(str1,str2) method in java.
I am actually taking a substring from a user input, parsing it and then
I am doing:
userInput = userInput.replaceAll(str1,str2)
where str1 = some substring from user input
str2 = return value from someFunction(str1)
This works fine when user input does not contain parenthesis or any
other java.util.regex special characters. My code stops working in
case of regex special characters and I get str1 as the output of
replaceAll.
TIA
Gaurav