Hi All I need a text from a string The string is $mystring = "<p>{loadposition plans comas grv}</p>"; I need the result "plans comas grv" from the string for someone who is good in preg_match can solve in few min and that will help me. Waiting for your valuable post. Thanks, Subikar
preg_match( "%<p>loadposition (.*?)</p>%" , $input, $output); PHP: The text will be in $output[1] Note that the previous regex won't work due to the curly braces
Nope, previous regex works just fine. Just tested it on PHP 5.3.0. And the curly braces is a requirement - your regex doesn't account for them (just tested that too).