android - Replace Character inside brackets -
hi coders out there. allow me straight.
i want replace character in string within opening , closing brackets.
what have in code.
string value= str.replaceall("\\[.*\\]", "strtoreplace");
it's working , problem delete brackets.
ex:
want [hello].
the result:
want .
how can accomplish that? anyone? in advance. big help in me.
string s = str.replaceall("\[.*\]", "strtoreplace")
to
string s = str.replaceall("\[.*?\\]", "["+"strtoreplace"+"]")
android string replace
No comments:
Post a Comment