Home > PHP & Programming > Quizzes > Practice Test: POSIX Regular Expressions In PHP
Practice Test: POSIX Regular Expressions In PHP
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 75% Most missed: “The predefined default character class … can also be specified as [A-Za-z].”
Practice Test: POSIX Regular Expressions In PHP
Time left 00:00
20 Questions

1. The regular expression, … matches any string containing zero or one a.
2. The regular expression, … matches any string containing zero or more a’s.
3. The predefined default character class … can also be specified as [A-Za-z].
4. … matches any string inclosed within and .
5. The … function will split a string into various elements based on case insensitive pattern.
6. … are used to represent a list or range of characters to be matched.
7. The … function converts each character in a string into a bracketed expression containing two characters.
8. PHP offers …. functions for searching strings using POSIX style regular expressions.
9. State whether the following statements about regular expression are TRUE or FALSE.
i. A regular expression is nothing more than a pattern of characters itself that was matched against a certain parcel of text.
ii. It may be a pattern with which you are already familiar or it may be a pattern with specific meaning in the context of the word of pattern matching.
10. The … matches any string not containing any of the characters ranging from a through z and A through Z.
11. The … function will split a string into various elements based on case insensitive pattern.
12. The predefined default character class … can also be specified as [A-Za-z].
13. The predefined character class … will specify whitespace characters, including space, horizontal tab, vertical tab, newline, form feed, or carriage return.
14. The regular expression … will match any string containing exactly three characters.
15. The … function will be useful when checking the validity of strings, such as passwords.
16. … matches any string containing a ‘b’ followed by zero or more instances of the sequence of ‘ag’.
17. The POSIX implementation of regular expression was deprecated in the PHP version…"
18. The regular expression, … matches any string containing zero or one a.
19. The predefined default character class … specifies printable characters found in the range of ASCII 33 to 126.
20. … are used to represent a list or range of characters to be matched.