Regex Tuesday Challenge - Week Seventeen

In the first challenge of 2013 after the holidays, you have to match valid regular expressions. This challenge will be in several parts - in the first, you only have to match literal characters, character classes, and a few other minor features, and in future weeks I will be adding more features until we can accurately match nearly every regular expression.

To see what regex features must be supported, it would probably be better to look at the test cases. The features that must be matched are literal characters, character classes, and the following operators: .?+*. The global and case insensitive operators should also be matched.

To test a regular expression on the test cases below, type it into the text input. Each test case will be marked as passed or failed respectively - you are aiming to get as many test cases as you can to pass. Note that JavaScript must be enabled for this feature to work. The regex engine used is the JavaScript regex engine; it is similar to PCRE, but with a few differences.

Test cases (0/43)

/regex/
match
/regexp?/
match
/regexp?/g
match
/regexp?/gi
match
/ab?c+/i
match
/ab*c+/g
match
/a[bc]+/
match
/a?[bc]?/i
match
/[bc]*/
match
/[]/
match
/[]+/
match
/[]?/g
match
/r?e?x*/
match
/[**]/
match
/[**]*/
match
/[Rr]eg[Ee]xp?/
match
/[ab][cd]+/
match
/regex+?/
match
/regex*?/
match
/a\/a/
match
/\*/g
match
/\?/i
match
/\+/i
match
/\??/
match
/\?+/g
match
/[?]+/
match
/regex??/
match
regex
no match
regex?
no match
//
no match
/*/
no match
/+/
no match
/?/
no match
/regex?+/
no match
/regex*+/
no match
/regex/n
no match
/regex/*
no match
/a/a/
no match
/\/
no match
/\\\/
no match
/[Rr]egE**xp?/
no match
/[Rr]egExp?+/
no match
/[Rr]++egExp?/
no match
Congratulations, your regex passes all the test cases! Remember to share this challenge.