string - Change double quotes to single in java but with some restrictions -


i need change double quotes single quotes in java having restrictions.

e.g.: consider

' love "apple" , "banana" much'.  

i don't want change "apple" , "banana" double quotes single quotes.

another one:

"hi! what's up?" 

output:

'hi! what's up?' 

can me on this?

if strings processed line line wont problem. can make sure first , last characters '. may check string documentation, has lot of methods this.

but if dealing paragraph or sentences can tricky. can use natural language processing (nlp) there many java implementations of google , can find one.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -