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

python - PyInstaller UAC not working in onefile mode -

ios - Pass NSDictionary from Javascript to Objective-c in JavascriptCore -

wso2is - WSO2 IS 5.0.0 SP1 After restart there is authentication error -