New polymorphic advantages by combining OO elements of the Java™ and C++ languages with built-in support for regular expressions (in terms of class definitions, inheritance, member functions) and by applying the principle of virtual class membership to production rules are presented. Virtual member production rules are incorporated into a ‘V-table’ concept. Instantiated production rules are type-compatible embodiments of regular expressions. Polymorphic regular expressions are leveraged through the ‘document design pattern’.