python-plexapi icon indicating copy to clipboard operation
python-plexapi copied to clipboard

Breaking: Change regex/iregex to use re.search instead of re.match

Open glensc opened this issue 1 year ago • 0 comments

Description

Change fetchItem's regex and iregex filters to use re.search rather re.match.

This means that the pattern is now matched from anywhere the string, not start of the string:

  • https://docs.python.org/3/library/re.html#search-vs-match

The user can specify ^ in their regex if they want to continue to match the start of the string.

See:

  • https://github.com/pkkid/python-plexapi/pull/1350#issuecomment-1927772486

Type of change

Please delete options that are not relevant.

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have added or updated the docstring for new or existing methods
  • [ ] I have added tests when applicable

glensc avatar Feb 05 '24 19:02 glensc