Correct Answer: Copyright 2007
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 snippet used to check the password strength: < ?php $password = 'Fyfjk34sdfjfsjq7'; if (preg_match('/^.*(?=.{8,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*$/', $password)) { echo 'Your passwords is strong.'; } else { echo 'Your password is weak.'; } ?> What will be the output of the above code snippet?
Analyze the following code snippet that uses the preg_quote() PHP Regular Expression method: < ?php $keywords = '$40 for a g3/400'; $keywords = preg_quote($keywords, '/'); echo $keywords; ?> What will be the output of the above code?
Which of the following characters is not matched by a Regular Expression when a .(dot) character is set?
Analyze the following code: < ?php $string = 'The GOD is the Lord.'; $string = preg_replace('/The/g', 'Ze', $string); echo $string; ?> What will be the output of the above code snippet?
What is the [\b] PHP Regular Expression modifier used for?
Suppose you use [hc]+at for pattern matching as a Regular Expression. Which of the following patterns does not match the above expression?
Analyze the following code snippet that uses the preg_last_error() PHP Regular Expression method: < ?php preg_match('/(?:\D+|<\d+>)*[!?]/', 'foobar foobar foobar'); if (preg_last_error() == PREG_BACKTRACK_LIMIT_ERROR) { echo 'Backtrack limit was exhausted!'; } ?> What will be the output of the above code?
Which of the following PHP Regular Expression modifiers finds one or more occurrences of a specific character in a string?
Which of the following flags is used to include a newline character \n while using the dot meta character of PHP Regular Expressions?