I need some help with regex. I would like to replace any sequence of whitespaces larger than 5 by comma.
I would like to create a comma seperated file from the following file, where values are delimited by a sequence of whitespaces > 5 (it is a console output). However, single whitespaces may also occur inside the values.
Thanks for your help!
Add code tags which show the whitespace better.[/edit]
Check out the Javadoc of java.util.regex.Pattern. Then tell us which regex you have created for finding 5 or more spaces. Hint: you can use space in regexes without needing to escape it. For instance, " *" is zero or more spaces.