Normalize variable names.
Add support for BASE.
Add support for regular expressions.
Add examples from spec sections 5 and 6.