Describe the bug
Lookahead (and lookbehind) functions do not work as expected with regex in chat filters. When used they don't match anything.
Minecraft Info
- AdvancedChatFilters-1.0.0.jar
To Reproduce
Steps to reproduce the behavior:
- Make a new chat filter.
- Type 'test(?= test)' in the 'String to Find' field and set filter type to 'RegEx'.
- Type 'success' in the 'Replace to' field and set 'Replace Type' to 'Only Match'.
- Exit menu and write 'test test' in Minecraft chat.
- See error.
Expected behavior
The 'test test' string written in chat should be replaced with to 'success test', however it remains 'test test'.
Screenshots


Additional context
Mods used: Carpet, Voxel Map, Litematica, MaLiLib, MiniHUD, ModMenu, Optifabric, OptiFine, Fabric API, AdvancedChatCore, AdvancedChatFilters and AdvancedChatLog.
It does work as expected at regextester.com, so it shouldn't be a general regex bug.
Exported Chat Filter:
{"name":"foot","active":true,"stripColors":true,"findString":"testt(?\u003d test)","findType":"regex","replaceType":"onlymatch","replaceTo":"success","replaceTextColor":false,"textColor":"#FFFFFFFF","replaceBackgroundColor":false,"backgroundColor":"#FFFFFFFF","processors":{"forward":{"active":true},"actionbar":{"active":false},"sound":{"active":false,"notifySound":"none","soundPitch":1.0,"soundVolume":1.0},"narrator":{"active":false,"message":"$1"}},"order":0}
Describe the bug
Lookahead (and lookbehind) functions do not work as expected with regex in chat filters. When used they don't match anything.
Minecraft Info
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The 'test test' string written in chat should be replaced with to 'success test', however it remains 'test test'.
Screenshots
Additional context
Mods used: Carpet, Voxel Map, Litematica, MaLiLib, MiniHUD, ModMenu, Optifabric, OptiFine, Fabric API, AdvancedChatCore, AdvancedChatFilters and AdvancedChatLog.
It does work as expected at regextester.com, so it shouldn't be a general regex bug.
Exported Chat Filter:
{"name":"foot","active":true,"stripColors":true,"findString":"testt(?\u003d test)","findType":"regex","replaceType":"onlymatch","replaceTo":"success","replaceTextColor":false,"textColor":"#FFFFFFFF","replaceBackgroundColor":false,"backgroundColor":"#FFFFFFFF","processors":{"forward":{"active":true},"actionbar":{"active":false},"sound":{"active":false,"notifySound":"none","soundPitch":1.0,"soundVolume":1.0},"narrator":{"active":false,"message":"$1"}},"order":0}