piiregex icon indicating copy to clipboard operation
piiregex copied to clipboard

Add matches method

Open jamieforrest opened this issue 2 years ago • 0 comments

It would be helpful to be able to get the list of all of the regex matches separately from the boolean method any_match. This PR adds a new matches method to do just that, and refactors any_match to use the new method. It also adds two new unit tests, similar to others in the test suite, to test this new method.

The PR also adds a small refactor to reduce duplicate code by creating two new helper methods for building the regex class attributes and callables: __build_regex_class_attributes and __build_class_attributes_callables.

jamieforrest avatar Jan 29 '24 15:01 jamieforrest