Skip to content

Instantly share code, notes, and snippets.

@biswarupadhikari
Created May 9, 2013 12:54
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 biswarupadhikari/5547278 to your computer and use it in GitHub Desktop.
Save biswarupadhikari/5547278 to your computer and use it in GitHub Desktop.
PHP: Regular Expression Example can be used in joomla plugin development
<?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