Closed Sophist-UK closed 7 years ago
This PR is ready for merge - sorry about the number of commits.
@Sophist-UK thanks for the contribution! I'll release a new tagged version quite soon, doing some adjustments on travis and coding standards.
No problem. My reasons are a little convoluted.
I used to run a wordpress site, accessible over IPv6. This web site runs using wordpress. I installed the wp-dashboard-log-monitor plugin. This plugin uses kasner/log-parser under the covers. I get occassions when the plugin doesn't work because the end two parts of the IPv6 address are zero so the IPv6 address ends in ::. So I fix it here, and it is included in the dashboard plugin and the errors stop.
🥇
@Sophist-UK 1.2.0
is released and includes this PR. Thanks again for your contribution!
IPV6 parsing fails with leading or trailing ::.
This PR tweaks the regex for IPv6 to handle leading and trailing :: and splits the regex for IP addresses into several parts for readability and maintainability.