Created
June 17, 2016 11:34
-
-
Save larrycinnabar/0f8b6f31ad6d37e4a1e4dac0cd3ecf5d to your computer and use it in GitHub Desktop.
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 | |
$pattern = '#a\s+href\s*=\s*"(.+)"#'; | |
$str = 'Get your image here: <a href="http://google.com">here</a>'; | |
$matches = []; | |
preg_match ( $pattern ,$str,$matches); | |
$link = $matches[1]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment