SarkariResultess QA Bank

PHP regex replacement के लिए क्या उपयोग करते हैं? को secure तरीके से कैसे implement करें?

Other 0 Views Verified
PHP regex replacement के लिए क्या उपयोग करते हैं? को secure तरीके से कैसे implement करें? सही विकल्प चुनें और code/solution को समझें।
Sarkari Result QA Bank
Editorially reviewed exam information

Answer & Explanation

4 Answers
Verified Correct Answer

preg_replace('/foo/i', 'bar', $text);

preg_replace('/foo/i', 'bar', $text);
Additional Explanation
preg_replace() regex matches replace करता है। User input को trust न करें; validation, escaping और prepared statements context के अनुसार उपयोग करें।
Verified

regex_replace_only()

regex_replace_only()
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Verified

$text.regexReplace()

$text.regexReplace()
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Verified

replace_regex_php()

replace_regex_php()
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।