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

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -