This software provides Perl 5 regex objects that can be used for pattern matching and string manipulation. With these objects, developers can efficiently and effectively search for specific patterns in text, extract information from strings, and perform various string operations using regular expressions.
The __object__ Base Class provides nodes that inherit from Regexp::Parser::__object__ with the following methods:
• $obj->data(): Returns the object's data, which might be an array reference (for a 'branch' node), a different object (for a 'quant' node), or it might not exist at all (for an 'anchor' node).
• $obj->ender(): Returns the arguments to object() to create the ending node for this object. This is used by the walk() method.
• $obj->family(): Returns the general family of this object. The families are any of: alnum, anchor, anyof, anyof_char, anyof_class, anyof_range, assertion, branch, close, clump, digit, exact, flags, group, groupp, minmod, prop, open, quant, ref, reg_any.
• $obj->flags(): Returns the flag value for this object. This value is a number created by OR'ing together the flags that are enabled at the time.
• $obj->insert(): Inserts this object into the tree. It also returns a value that says whether or not it ended up being merged with the previous object in the tree.
• $obj->merge(): Merges this node with the previous one. If called after $obj has been added to the tree, $obj will be removed from the tree. Returns true if the node got merged with the previous one.
• $obj->omit(): Returns whether this node is omitted from the parse tree. Certain objects do not need to appear in the tree, but are needed when inspecting the parsing or walking the tree. You can also set this attribute by passing a value.
• $obj->qr(): Returns the regex representation of this object, along with the regex representation of any of its children.
• $obj->raw(): Returns the raw representation of this object, which does not look at the children of the object, just itself. This is primarily used when inspecting the parsing of the regex.
• $obj->type(): Returns the specific type of this object. See the object's documentation for possible values for its type.
• $obj->visual(): Returns the visual representation of this object, along with the visual representation of any of its children.
• $obj->walk(): "Walks" the object. This is used to dive into the node's children when using a walker (see "Walking the Tree" in Regexp::Parser).
Objects may override these methods (as they often do).
Version 0.20: N/A