nerdexam
Zend

200-530 · Question #407

Consider a string in the following format: abcd/a.d You want to perform regular expression in this string; however, you are unable to do this since the string contains special characters. You can…

The correct answer is D. preg_quote(). See the full explanation below for the reasoning.

Question

Consider a string in the following format: a*bcd/a.d You want to perform regular expression in this string; however, you are unable to do this since the string contains special characters. You can make this string PCRE compatible if you convert this string in the following format: a*bcd/a.d Which of the following functions will you use to accomplish the task into a single call?

Options

  • Apreg_match()
  • Bexpload()
  • Cpreg_split()
  • Dpreg_quote()

How the community answered

(25 responses)
  • A
    4% (1)
  • B
    8% (2)
  • C
    4% (1)
  • D
    84% (21)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice