Ptrap accepts an arbitrary number of filters; each filter applies to a port, and may match over both the data and attributes of plumb messages. A filter is formatted as a port name, a data filter, and a list of attribute filters. The data filter is a regex(6) that matches the plumbed data. The attribute filter consists of the attribute name prefixed with a '+', followed by a regex(6) that matches the contents of the attribute. Any regex may be prefixed with a '!' in order to negate a match, causing all matches for that regex to be discarded. All parts of a filter must match in order for a plumb message to be forwarded.