clean up the generated filterparser.js file

 * remove toSource, not used and throws warnings
tests for regex argument parser
Merge pull request #438 from zhaoz/regex

Tests for regex, remove dead parser code.