It's been a long time since I've used delimiters in the Scanner class in Java. If I wanted to have any numbers between an expression, such as xx/xx/xxxx or an infinite amount of numbers between them with just the forward slashes as delimiters, what would the syntax be? I came up with
And is this similar to C++ and Python? Also can't remember. D'oh! Sorry, and thanks for your help!
That's not the same format as the data in the first post, so onviously the answer is going to be different.
Are you saying there may also be arbitrary white space in the data? Or only inbetween numbers? As well as or instead of the / demiliters?
Assuming they are not embedded then you need to delimlit on any number of white spaces and/or / characters.
You could try useDelimiter("[\\s/]*"
... but there are others here who are for moreexpert in regexs than I am.