Question: So I have a string that is like this:

```
"Some text here?Some number here"

```

and I need to split those, I am using `String.split("\\?")`, but if I have a string like this:

```
"This is a string with, comma?1234567"

```

I have it splitted in the comma(`,`) too. And if I have this String:

```
"That´s a problem here?123456"

```

It also splits on `´`, So how can I fix this?

Answer: 
I am not seeing this behaviour: (nor would I expect to)

```
String s ="hello?1000";

String[] fields = s.split("\\?");

for (String field : fields) {
   System.out.println(field);
}

```

yields:

hello

1000

Introducing a comma "," or an apostrophe "'" doesn't make any difference to the split:

```
String s ="he,llo?1000";

```

yields:

he,llo

1000

```
String s ="he'llo?1000";

```

yields:

he'llo

1000

The spilt also works fine if you have any spaces in your input string. I can only suggest that your regex is not what you think it is!
Looks like a typical regex problem.
I am using this for example to split

```
name (code)

```

into a pair with the name and the code separate:

```
RE regex = new RE("(.*) \\W(.*)\\W");
if(!regex.match(term)){
    throw new InvalidArgumentException("the given term does not match the regelar expression:'NAME (ID)'");
}
Pair<String,String> pair=new Pair<String,String>(regex.getParen(1),regex.getParen(2));
return pair;

```