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 -

python - Error: Unresolved reference 'selenium' What is the reason? -

php - Need to store a large amount of data in session with CI 3 but on storing large data in session it is itself destorying automatically -