You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `object IsInt` with the `.unapply` method is called an extractor. It allows to define patterns to match on. Here it will give me a number if it can parse it from a string
71
+
The `object IsInt` with the `.unapply` method is called an extractor. It allows to define patterns to match on. Here it will give me a number if it can parse it from a string.
72
72
73
73
The `findPartsAndSymbols` does the parsing and returns a collection of `PartNumber` and `Symbol`. What we want to match on is either a number or a symbol (which is anything except the `.` and a `digit`). The regex match gives us some information (such as starting / ending position of the matched string) which we use to create the `PartNumber` and `Symbol` instances.
0 commit comments