The following regex matches a string containing one or more of the ap.9 characters:
^[ap9.]+$
The dot (.) doesn't need to be escaped inside the character class.
The following regex matches a string containing one or more of the @#$%.* characters:
^[$#@%.*]+$
None of the preceding special characters require escaping inside the character class.
The following regex matches a string containing one or more of the ?*+. characters:
^[*+?.]+$
The following regex matches an input that allows any digit, ], or ^ in the input:
^[\^\]0-9]+$
We can also write our regex as ^[\]0-9^]+$ by moving ^ away from the first position and avoiding the escaping.
The following regex matches an input that ...