Quantcast
Channel: How do we remove special characters from a string from a particular position in java? - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Wiktor Stribiżew for How do we remove special characters from a...

You can useinputString.replaceAll("(\\G(?!^)|name=\")([^\"\\p{Punct}]*)\\p{Punct}(?=[^\"]*\")", "$1$2")See the regex demoThe regex matches(\G(?!^)|name=\") - Group 1: name=" or the end of the preceding...

View Article



Answer by ChivalrouS for How do we remove special characters from a string...

For the replacement. You need to first get the content value of name field. Then you can remove special characters from the string.Example code block: String line = "name=\"xyz =bcd .olm --=myname\"";...

View Article

How do we remove special characters from a string from a particular position...

I have a scenario where i have to remove special characters from a string.Input String : name=/"xyz =bcd .olm --=myname/"Output String Must be Like: name=/"xyz bcd olm myname/"I tried something like...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images