Go to the source code of this file.
Functions | |
| MatchRegularExpressionExample1 () | |
| MatchRegularExpressionExample1 | ( | ) |
Definition at line 11 of file MatchRegularExpressionExample1.php.
00012 { 00013 $objMatchRegularExpression = new MatchRegularExpression(); 00014 $objMatchRegularExpression->addItem( "M(.*)y" ); 00015 $objMatchRegularExpression->addItem( "A(.*)e" ); 00016 $objMatchRegularExpression->addItem( "Winter(.*)" , "machine" ); 00017 $objMatchRegularExpression->addItem( "^Case$" , "hacker" ); 00018 00019 if ( $objMatchRegularExpression->found( "Molly" ) !== true ) return false; 00020 if ( $objMatchRegularExpression->match( "Molly" ) !== true ) return false; 00021 if( $objMatchRegularExpression->match( "Wintermute" ) !== "machine" ) return false; 00022 if( $objMatchRegularExpression->match( "Flatline" ) !== false ) return false; 00023 return true; 00024 } 00025 00026 if( MatchRegularExpressionExample1() === true ) 00027 { 00028 print "ok!"; 00029 }
1.5.9