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 -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -