So, I am looking at different numbers that have different separators, and I want to find all numbers with the same separator.
Basically, I want the following
123+456+7890
123-456-7890
123.456.7890
123+456-7890
My current regex that I planned to use was
\d{3}[+-.]\d{3}[+-.]\d{4}
However, it will correspond to numerical sequences that have different delimiters. I don’t want to use one big huge OR for something like that, because in the equivalent of real life there are many other characters that could fit there.
Is there a way to match the same character in multiple places?
source
share