How to replace one double inverted quote with two single inverted qoutes in java -
i want sample program replace double inverted quote 2 single inverted quotes.
example:
input :
"hello","my name xyz"
output:
``hello'',``my name xyz''
help appreciated.
you use regular expressions follows:
str = str.replaceall("\"(.*?)\"", "``$1''");
(note unmatched "
in end left is.)
Comments
Post a Comment