java - Replace "^" char -
java - Replace "^" char -
i'm trying replace "^" character on string using:
string text = text.replaceall("^", "put text"); if text next value:
"x^my string" the resulting string is:
"put textx^my string" this happens in case of ^ character
why this?
just utilize non-regex version string.replace() instead of string.replaceall():
text = text.replace("^", "put text"); java regex string character
Comments
Post a Comment