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

Inverse Matching Bug #58

Open
iHwin opened this issue Jul 21, 2014 · 4 comments
Open

Inverse Matching Bug #58

iHwin opened this issue Jul 21, 2014 · 4 comments

Comments

@iHwin
Copy link

iHwin commented Jul 21, 2014

  1. 'Send matches to tab' checked.
  2. 'Inverse match' checked.

Using these settings to filter out certain messages. Inverse matching works correctly when the message is short and only takes up a single line. Inverse matching fails when the message is long enough that it wraps to the next line(s).

2014-07-20_18 21 42
2014-07-20_18 21 44
2014-07-20_18 21 51

Expected Result: All of those [G] and [Tr] messages should be filtered out.
Actual Result: Single line messages are filtered out, multiple line messages are not.

Note: Filtering messages with 'Inverse match' unchecked has no issues when they are single or multiple lines.
2014-07-20_18 24 16

@killjoy1221
Copy link
Collaborator

This has been here since 1.6. This happens because it parses the message by line. In 1.7, the entire message is sent on one line instead of the server splitting it for us. The main reason is me being too lazy to change it to split right before it's rendered.

@killjoy1221
Copy link
Collaborator

I think I might remove the inverse option. It's something you can do easily in regex anyway by pre-pending '!'.

I tested this with the expression "^<", and inverted, matching not speech, and sent it to a tab. I was unable to reproduce no matter the length of my message. When I colored it though, only the first line was effected. I'm going to fix that, and hopefully, this issue will get fixed with it.

@iHwin
Copy link
Author

iHwin commented Jul 24, 2014

As far as I know you actually can't just pre-pend the regex with an '!' to invert it. This must be done with the negative lookahead assertion '?!' like so: (?!foo). Simply adding an '!' in front will return no results, which may be the reason why you were unable to reproduce it. A brief example:

foo
bar
cat

Searching for "(?!foo)" returns "bar" & "cat".
Searching for "!foo" or "!(foo)" returns nothing (it literally searches for "!foo", which is not there).

I tested your same expression "^<", inverted it like so "^(?!<)", and sent it to a tab. I was able to successfully reproduce the multiple lines issue. I am not sure how you inverted it in your test, but please try entering the "/help" command in game to make sure that the filter is working properly. It should filter out player chat and still display the help page.

@killjoy1221
Copy link
Collaborator

Your filter is wrong. It should be this.
^\[(G|V|Tr|Auc)\]

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

No branches or pull requests

2 participants