java - How to split a String at all special characters except dot? -


string line="word,1.2;3.1!4.5"; 

what regex should use in split(...) remove special characters except dot? (i need dot keep double , float values)

(?!\\.)\\w 

you can use this.see demo.

https://regex101.com/r/cd5jk1/4


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -