aahnik / tgcf

The ultimate tool to automate custom telegram message forwarding. Live-syncer, Auto-poster, backup-bot, cloner, chat-forwarder, duplicator, ... Call it whatever you like! tgcf can fulfill your custom needs.
https://github.com/aahnik/tgcf/wiki
MIT License
1.34k stars 795 forks source link

Regex within whitelist filter not working #458

Open uwedisch opened 1 year ago

uwedisch commented 1 year ago

Describe the bug The following regex within whitelist filter isn't working as intended: "From: +1234567890\nDevice: .*\nMessage:\nPANIC ALARM\n\n" No forwarding of messages that have this text inside.

To Reproduce Put message that contains fitting text. Message also contains the characters "|", "(" and ")".

Expected behavior Whitelist is hit and message forwarded.

Additional context https://regex101.com/ says the regex is ok and fires on test messages. At the end of #191 there is a report of a similar issue after feature was released.

grafik

uwedisch commented 1 year ago

Done more testing. Without regular expressions enabled and creating the next text rule the filter works: PANIC ALARM

If I enable regex and type the next regex filter it does not work: "PANIC ALARM"

More simple regex is not possible.

aahnik commented 1 year ago

hi @uwedisch thanks for reporting this issue! I will look into this and try to fix this....