java - How to split a String array? -


Replace a current row (string containing commas), replace white space with "" (trim space) and Finally, split string elements into arrays.

Why does not this work?

  string [] textLine = currentInputLine.replace ("\\ S", "") .split (",");  

I think you want to replace. Instead of

and replaced all ("\\ s", "") will remove all the spaces, not just unnecessary ones if it is not what you want You should replace All ("\\ s +", "\\ s") or something like that.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -