Created
August 31, 2015 11:04
-
-
Save chrisshennan/5c2ae926ca4a2acf2567 to your computer and use it in GitHub Desktop.
A list of useful regular expressions I commonly use
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Check if link absolute starts with (http, https or //) | |
preg_match('/^(http(s)?:)?\/\//', $link, $matches); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment