You need an approach that will deal with all possibilities that you can see now, and the ones you don't. What if you have 012345678: 012-34567-8?
If I wanted to do this, I'd create a function in a standard module and call it from the query, and parse the string in a way that will meet all the requirements. I say "if" because if your part number data is dash separated, then it probably should be stored that way as text. That would make this a one-time operation and further input might use an input mask (which I dislike).
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.