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 new search predicate to enable searching for messages matching a regex #3282

Merged
merged 12 commits into from
Oct 17, 2021
Merged

Add new search predicate to enable searching for messages matching a regex #3282

merged 12 commits into from
Oct 17, 2021

Conversation

LosFarmosCTL
Copy link
Contributor

@LosFarmosCTL LosFarmosCTL commented Oct 10, 2021

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

This PR adds a new regex predicate to the search dialog, to enable filtering for messages matching a specific regex.

It also introduces the option to surround a predicates value in quotation marks, to enable predicate values that contain spaces. (The old predicate functionality was kept intact, so everything that worked before still works exactly the same, just some new options)

for example: regex:"^Kappa [0-9]{1,3}$"

@Felanbird
Copy link
Collaborator

This will require a wiki entry, but otherwise seems to work well, any regex I thought of worked as intended.

@LosFarmosCTL
Copy link
Contributor Author

This will require a wiki entry

Oh yeah true, will open a wiki PR once I get home from work

Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than this change, it looks good to me.

Would really love a test suite for search predicates in the future, where we can supply a string e.g. in:pajlada regex:^xD and it would give a list of predicates/channels etc

src/messages/search/RegexPredicate.cpp Outdated Show resolved Hide resolved
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
@pajlada pajlada enabled auto-merge (squash) October 17, 2021 12:10
@pajlada pajlada merged commit 06245f3 into Chatterino:master Oct 17, 2021
zneix added a commit to SevenTV/chatterino7 that referenced this pull request Oct 25, 2021
Now we're on commit 4a90f10; Changes from upstream we've pulled:

- Minor: Added new search predicate to filter for messages matching a regex (Chatterino#3282)
- Minor: Subcategories in settings are now searchable. (Chatterino#3157)
- Minor: Highlight usernames in /mods and /vips messages (Chatterino#3187)
- Minor: Added chatter count to viewer list popout (Chatterino#3261)
- Minor: Added `flags.first_message` filter variable (Chatterino#3292)
- Minor: Removed duplicate setting for toggling `Channel Point Redeemed Message` highlights (Chatterino#3296)
- Bugfix: Fixed a bug that caused zero-width emotes to be misaligned when the "Remove spaces between emotes" setting is on. (Chatterino#3249)
- Bugfix: Fixed the "Change channel" popup showing a wrong window title (Chatterino#3273)
- Bugfix: Fixed built-in Chatterino commands not working in whispers and mentions special channels (Chatterino#3288)
- Bugfix: Fixed `QCharRef with an index pointing outside the valid range of a QString` warning that was emitted on every Tab press. (Chatterino#3234)
- Bugfix: Fixed being unable to disable `First Message` highlights (Chatterino#3293)
- Bugfix: Fixed `First Message` custom sound not persisting through restart. (Chatterino#3303)
@LosFarmosCTL LosFarmosCTL deleted the regex-predicate-search branch November 5, 2021 13:23
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.

3 participants