Skip to content

Instantly share code, notes, and snippets.

@lbvf50mobile
Last active August 28, 2020 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lbvf50mobile/fcfdf51a981c972097122578421382d1 to your computer and use it in GitHub Desktop.
Save lbvf50mobile/fcfdf51a981c972097122578421382d1 to your computer and use it in GitHub Desktop.
Just PHP FUN 088.
<?php
# https://www.codewars.com/kata/58ef89d42a9818c78200020a MAC Address : Regexp.
$pattern = "/^(([a-f0-9]{2}(\:[a-f0-9]{2}){5})|([a-f0-9]{2}(\-[a-f0-9]{2}){5})|([a-f0-9]{2}(-[a-f0-9]{2}){7})|([a-f0-9]{4}(\.[a-f0-9]{4}){2}))$/";
$flags = "i";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment