Regular Expressions - Study Mode
[#11] PHP has long supported two regular expression implementations known as _______ and _______. 1. Perl 2. PEAR 3. Pearl 4. POSIX
Correct Answer
(C) 1 and 4
[#12] Which one of the following regular expression matches any string containing zero or one p?
Correct Answer
(C) P?
[#13] [:alpha:] can also be specified as.
Correct Answer
(B) [A-za-z]
Explanation
Solution: [:alpha:] is nothing but Lowercase and uppercase alphabetical characters.
[#14] How many functions does PHP offer for searching strings using POSIX style regular expression?
Correct Answer
(A) 7
Explanation
Solution: ereg(), ereg_replace(), eregi(), eregi_replace(), split(), spliti(), and sql_regcase() are the functions offered.
[#15] POSIX implementation was deprecated in which version of PHP?
Correct Answer
(D) PHP 5.3