nerdexam
Zend

200-530 · Question #200

You need to escape special characters to use user input inside a regular expression. Which functions would you use? (Choose 2)

The correct answer is C. preg_quote() E. quotemeta(). See the full explanation below for the reasoning.

Question

You need to escape special characters to use user input inside a regular expression. Which functions would you use? (Choose 2)

Options

  • Aaddslashes()
  • Bhtmlentities()
  • Cpreg_quote()
  • Dregex_quote()
  • Equotemeta()

How the community answered

(40 responses)
  • A
    8% (3)
  • B
    3% (1)
  • C
    73% (29)
  • D
    18% (7)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice