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

Regex question #2133

Closed
LickABrick opened this issue Apr 19, 2024 · 2 comments
Closed

Regex question #2133

LickABrick opened this issue Apr 19, 2024 · 2 comments

Comments

@LickABrick
Copy link

LickABrick commented Apr 19, 2024

Describe the bug
How can I fix this regex? It worked before but suddenly doesn't anymore.

To Reproduce
Use: replaceMessages=[ ["<(?!img|a)[^>]*>",""], ["&nbsp;"," "] ]

Expected behavior
HTML Tags should be filtered out of the message.

Screenshots/debug logs
level=error msg="regexp in msteams.test-teams failed: error parsing regexp: invalid or unsupported Perl syntax: (?!" prefix=gateway

Environment (please complete the following information):

  • OS: Ubuntu 22.04
  • Matterbridge version: output of 1.26
@42wim
Copy link
Owner

42wim commented May 23, 2024

This has never worked, golang doesn't support ?!
See https://github.com/google/re2/wiki/Syntax

@42wim 42wim closed this as completed May 23, 2024
@LickABrick
Copy link
Author

Hi @42wim although I fully believe you I cannot explain then why it did seem to to work. See the following messages (one of many examples I can provide). The top one is sent before the regex, and the bottom one after:
image

Also I don't remember seeing the mentioned error message in the log.

Besides if it worked or not, is there any way I can edit this regex to make it work with Matterbridge?

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

No branches or pull requests

2 participants