Goal
Replace all simple string/substring/startswith filter parameters with Python regular expression matching across all plugins. This gives admins more flexibility without requiring separate --ignore-pattern and --ignore-regex parameters.
Background
Some plugins offer both --ignore-pattern (substring match) and --ignore-regex (regex match) for the same purpose, or use substring/startswith matching for filters like --ignore, --command, --username, etc. Regular expressions are a superset of simple strings: httpd as a regex still matches "httpd". Admins who need more power can use httpd|nginx, ^web\d+, or (?i)example without needing a separate parameter.
The procs plugin has already been migrated to regex matching for --argument, --command, and --username (documented as a Breaking Change in the current CHANGELOG).
What needs to change
For each affected plugin:
- Replace substring/startswith matching with
re.search() (or re.match() where startswith semantics are needed).
- Remove duplicate parameters where both
--ignore-pattern and --ignore-regex exist for the same purpose. Keep the regex variant.
- Update the help text to mention "Uses Python regular expressions." and case-sensitivity.
- Document as a Breaking Change: simple filters like
--ignore=httpd still work, but special regex characters (., *, (, [, \) in filter values are now interpreted as regex. Use --ignore='server\.local' to match a literal dot.
Backward compatibility
- Simple strings are valid regexes and match identically:
httpd matches "httpd" in both modes.
- Startswith behavior can be expressed as
^httpd.
- Exact match can be expressed as
^httpd$.
- The only breakage is when existing filter values contain regex-special characters that were previously treated as literals (e.g.
C:\Windows, server.local, file(1)).
Scope
All plugins that currently use substring, startswith, or in matching for filter parameters. The procs plugin is already done and serves as a reference implementation.
Classification
Breaking Change (next major version).
Goal
Replace all simple string/substring/startswith filter parameters with Python regular expression matching across all plugins. This gives admins more flexibility without requiring separate
--ignore-patternand--ignore-regexparameters.Background
Some plugins offer both
--ignore-pattern(substring match) and--ignore-regex(regex match) for the same purpose, or use substring/startswith matching for filters like--ignore,--command,--username, etc. Regular expressions are a superset of simple strings:httpdas a regex still matches "httpd". Admins who need more power can usehttpd|nginx,^web\d+, or(?i)examplewithout needing a separate parameter.The
procsplugin has already been migrated to regex matching for--argument,--command, and--username(documented as a Breaking Change in the current CHANGELOG).What needs to change
For each affected plugin:
re.search()(orre.match()where startswith semantics are needed).--ignore-patternand--ignore-regexexist for the same purpose. Keep the regex variant.--ignore=httpdstill work, but special regex characters (.,*,(,[,\) in filter values are now interpreted as regex. Use--ignore='server\.local'to match a literal dot.Backward compatibility
httpdmatches "httpd" in both modes.^httpd.^httpd$.C:\Windows,server.local,file(1)).Scope
All plugins that currently use substring, startswith, or
inmatching for filter parameters. Theprocsplugin is already done and serves as a reference implementation.Classification
Breaking Change (next major version).