php - Can someone please explain this function to me -
i studying how use regexp searching function.then came across this.i have tried days not.i appreciate if can break down me.
<?php preg_match("#<<(.*)>>#ismu", $object, $options)); ?>
the stuff between # pattern match against
the ismu @ end modifiers = case insensitive s = matches characters, including newlines. without it, newlines excluded m = treats subject string consisting of single "line" of characters if contains several newlines u = sets regex non greedy default
<<(.*)>> actual pattern self believe pulls out in input text between << >>
so if passed text string this <<strong>>test</strong> code match return array containing strong in strong inside << >> brackets
Comments
Post a Comment