Last active
August 29, 2015 13:57
-
-
Save jorwan/9749434 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 | |
$formMatch = array(); | |
$code = '<form name="otro_texto_que_sacare">texto_que_sacare</form>'; | |
preg_match_all("/<form (.*?)>(.*?)<\/form>/i", $code, $matches, PREG_SET_ORDER); | |
foreach ($matches as $data) | |
{ | |
print_r($data); | |
} |
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
Me gusto mas este flag : PREG_PATTERN_ORDER | |
$formMatch = array(); | |
$code = "<div id='spot_title'>Blue</div><div id='main_description'>Sint sit rerum ea vel eos consequatur. Aut cumque maxime est provident.</div><div id='price'>US$195</div>"; | |
preg_match_all("/main_description'>(.*?)<\/div>/i", $code, $matches, PREG_PATTERN_ORDER ); | |
print_r($matches[1][0]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment