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
Post a Comment