So I have a String I want to split into tokens of different types as part of a larger Parser.

```java
String input = "45 + 31.05 * 110 @ 54";

```

I use javas regex libraries Pattern and Matcher to interpret my regexes and find matches.

```java
String floatRegex = "[0-9]+(\\.([0-9])+)?";
String additionRegex = "[+]";
String multiplicationRegex = "[*]";
String integerRegex = "[0-9]+"

```

All my regexes gets merged into a single master regex with pipe symbols between the different regexes.

```java
String masterOfRegexes = "[0-9]+(\\.([0-9])+)?|[+]|[*]|[0-9]+"

```

I send this pattern into Pattern.compile() and get the matcher. As I step though from left to right running matcher.find(), I expect to get this structure out, up to the point of the "@" symbol where an InvalidInputException should be thrown.

```java
[
  ["Integer": "45"],
  ["addition": "+"],
  ["Float": "31.05"],
  ["multiplication": "*"],
  ["Integer": "110"]
  Exception should be thrown...
]

```

Problem is that matcher.find() skips the "@" symbol completely and instead find the match of the next Integer past "@", which is "54".

Why does it skip the "@" symbol and how can I make it so the exception gets thrown on a character it doesn't recognize from my pattern?