Correct Answer: preg_match("/eg+(?=:)/", $string, $match)
Explanation:
Note: This Question is unanswered, help us to find answer for this one
Regular Expressions With PHP Test Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More Regular Expressions With PHP Test MCQ Questions
Analyze the following code: < ?php $string = '%Give_result%'; preg_match_all('/[\W]/', $string, $matches); foreach($matches[0] as $value) {echo $value;} ?> What will be the output of the above code snippet?
Suppose you pass world{2,3} as a pattern to be matched to a specified string as shown in the code snippet below: $pattern = world{2,3}; Which of the following strings does not match the above pattern?
Suppose you pass a(bc)* as a pattern to be matched to a specified string using PHP Regular Expressions. Which of the following strings does not match the above pattern?
Which of the following PHP Regular Expression modifiers finds any non digit character in a given string?
Which of the following statements are true about the \b PHP Regular Expression modifier?
Which of the following characters is found by a Regular Expression when the \s PHP modifier is set?
Analyze the following code: < ?php $str='This lathe turns wood.'; echo(preg_match('/\Bthe\b/', $str)); ?> What will be the output of the above code snippet?
Which of the following PHP Regular Expression modifiers finds zero or one occurrences of a specific character in a string?
Analyze the following code: < ?php $string = '1, 100 or 1000?'; preg_match_all('/10*/',$string,$matches); foreach($matches[0] as $value) {echo $value; } ?> What will be the output of the above code snippet?
Analyze the following code snippet that uses the preg_replace() PHP Regular Expression method: < ?php $string = 'This is the {_FOO_} brought to you by {_BAR_}'; $template_vars=array('FOO' => 'The PHP Way', 'BAR' => 'PHPro.orG'); $string = preg_replace('/{_(.*?)_}/ime', '\$template_vars['$1']',$string); echo $string; ?> What will be the output of the above code?