Parses and tokenizes Perl regular expressions.