You need to escape special characters to use user input inside a regular expression. Which functions would you use? (Choose 2)
Suggested Answer: C, E
Get Premium 200-710 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
12 comments · newest first
CE
Cecily
1 year ago
Surprised to see addslashes() mentioned here!
CH
Cherry
1 year ago
Wait, regex_quote() isn’t a real function, right?
HY
Hyun
1 year ago
I disagree, I’d go with htmlentities() instead.
DA
Dahlia
1 year ago
I think quote_meta() is also a good choice.
FR
Freeman
1 year ago
preg_quote() is definitely one of them!
SA
Sabrina
1 year ago
I think `htmlentities()` is used for HTML escaping, so it probably isn't the right choice here.
AM
Amie
1 year ago
I'm not entirely sure about `quote_meta()`, but it sounds familiar. I might have seen it in a practice question before.
WA
Wayne
1 year ago
I think I remember that `preg_quote()` is definitely one of the functions we need for escaping special characters in regex.
VA
Valentin
1 year ago
I feel like `addslashes()` is more for SQL injections, not really for regex. I could be wrong though.
JU
Julianna
1 year ago
Hmm, I'm a bit confused on this one. I'll need to carefully read through the options and make sure I understand how each one would affect the accident claim case.
OR
Oretha
1 year ago
For some reason, I keep thinking it might be `Idap.settings`, but it sounds a bit off. I think I've confused it with another topic.
SU
Sue
1 year ago
Okay, I've got this. Tracking the effort required to resolve faults is clearly related to the maintainability of the system. That's the quality characteristic that this data would provide the most insight into.