nerdexam
Zend

200-710 · Question #202

How many elements does the $matches array contain after the following function call is performed? preg_match('/^(\d{1,}(\.[0-z]+))((?:\s+\S)+?)(\s+(?=201[0-9]))/', '21st March 2014', $matches);

The correct answer is C. 3. See the full explanation below for the reasoning.

Question

How many elements does the $matches array contain after the following function call is performed? preg_match('/^(\d{1,}(.[0-z]+))((?:\s+\S)+?)(\s+(?=201[0-9]))/', '21st March 2014', $matches);

Options

  • A1
  • B2
  • C3
  • D4

How the community answered

(36 responses)
  • A
    3% (1)
  • B
    6% (2)
  • C
    78% (28)
  • D
    14% (5)

Community Discussion

No community discussion yet for this question.

Full 200-710 Practice