nerdexam
National_Instruments

200-500 · Question #185

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

(54 responses)
  • A
    6% (3)
  • B
    11% (6)
  • C
    80% (43)
  • D
    4% (2)

Community Discussion

No community discussion yet for this question.

Full 200-500 Practice