want to use delimer for [, in the same delimter.
if the text for example is: [7,(-1-5i)]
so to make a delimiter for [, so I can separate the 7 as a intger
CodePudding user response:
You need to escape the [
character, which is has a special meaning in a regex:
myScanner.useDelimiter("[\\[,]");