<p>Not a competition, it is instead me trying to find why a certain regex works in one but not the other.</p>

<pre><code>(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)
</code></pre>

<p>That's my Regex and I'm trying to run it on</p>

<pre><code>127.255.0.0
</code></pre>

<p>Using Pythons regex I get nothing, using PHP I match it, below are the two calls I am making (just incase it's something to do with that). Essentially I am trying to work out why it works in PHP but not Python.</p>

<pre><code>re.findall(regex, string)
preg_match_all($regex, $string, $matches);
</code></pre>

<p><hr>
Solution found, it was due to the way that I was iterating through the results, this regex turned them into groups and then it didn't want to print them out in the same way etc etc. Thank you all for your help, it's really appreciated.</p>

It works for me. You must be doing something wrong.
```
```
>>> re.match(r'(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)', '127.255.0.0').groups()
('127', '255', '0', '0')
```
```
Don't forget to escape the regex using raw strings:
```
r'regex_here'
```
as stated in the
Regex Howto