Created
May 9, 2013 12:54
-
-
Save biswarupadhikari/5547278 to your computer and use it in GitHub Desktop.
PHP: Regular Expression Example can be used in joomla plugin development
This file contains hidden or 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 | |
$text="welcome to my blog {Twitter}google{/twitter}this ius how us follow me on {twitter}biswarupa | |
{/twitter} created i dont ondsfdsk dsf"; | |
preg_match_all('/{twitter}(.*?)\{\/twitter}/is',$text,$matches); | |
print_r($matches); | |
/* | |
*/is i means case insesitive {twitter} or {TWiter} s whitespace or newline like {twitter} | |
{/twitter} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment