Using a java.util.Scanner
instance, is it possible for it to return all remaining content? My scenario is that once I have read a number of fields within a String
, I just want to get whatever is left and store that somewhere else. For example my content could include:
1,2,Some Garbage with \' special characters and so on
I would construct the scanner using ,
as the delimiter, call getInt()
twice and then want to get "Some Garbage with \' special characters and so on"
back in one call.