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.)

ideone.com demo


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -