Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add matches method #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jamieforrest
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant