National_Instruments
200-500 · Question #214
Which parts of the text are matched in the following regular expression? 1 <?php 2 $text = <<<EOT 3 The big bang bonged under the bung. 4 EOT; 6 preg_match_all('@b.n?g@', $text, $matches); 7 ?>
The correct answer is C. big bang bong bung. See the full explanation below for the reasoning.
Question
Which parts of the text are matched in the following regular expression? 1 <?php 2 $text = <<<EOT 3 The big bang bonged under the bung. 4 EOT; 6 preg_match_all('@b.n?g@', $text, $matches); 7 ?>
Options
- Abang bong bung
- Bbang bonged bung
- Cbig bang bong bung
- Dbig bang bung
How the community answered
(42 responses)- A2% (1)
- B14% (6)
- C79% (33)
- D5% (2)
Community Discussion
No community discussion yet for this question.