regex: check if two phone numbers differ at most by 1 number : <p>I have a dataset of phone numbers that I want to check against each other. Basically the regex should throw a match if two phone numbers are at most 1 digit apart. For example, we have the following phone numbers:</p>

<ul>
<li>+31612345678</li>
<li>+31612245678</li>
</ul>

<p>These numbers are the same apart from position number 7 (first number has a 3 while the second number has a 2). As these phone number differ by 1 digit, the regex should throw a match. It stands to reason that the regex should also throw a match if the phone numbers are exactly the same. In the following case (see below), the regex should however not throw at match as the phone numbers differ by more than 1 digit:</p>

<ul>
<li>+31612345678</li>
<li>+31611145678</li>
</ul>

<p>Does anyone have a good regex in mind? I am writing the regex using the re module in python. </p>
