Midterm Study 2 Flashcards
What is the code to match any character?
.

What is the code to match any alphanumeric character?
\w
What is the code to match any non-alphanumeric character?
\W
What is the code to match any whitespace character?
\s
What is the code to match any non-whitespace character?
\S
What is the code to match any digit character?
\d
What is the code to match any non-digit characteR?
\D
What is the code to match a, b, or c?
[abc]
What is the code to match a to g?
[a-g]
What is the code to match 6, 7, a to g?
[67a-g]
What is the code to match any character but a, b, or c?
[^abc]
What is the code to match any capital letter?
[A-Z]
What is the code to escape the next characteR?
\
What is the code to anchor at the beginning?
/^abc/
What is the code to anchor at the end?
/acb$/
What is the code to anchor both beginning and end?
/^abc$/
What is the code to check for zero or one occurrence?
?
What is the code to check for zero or more occurrences?
*
What is the code to check for one or more occurrences?
+
What is the code to check for m occurrences
{m}
What is the code to check between m and n occurrences?
{m,n}
How to group characters together for repetition?
()
what is the code for the OR operator?
|
How do you filter input for integer?
$_GET[“NUMBER”] FILTER_INPUT(INPUT_GET, “NUMBER”, FILTER_VALIDATE_INT)

echo "$i: {$x[$i]}
";
}
