Does anybody have experience with zipgrep? I'm trying to run a regex with alternation but for some reason it's not working. I run:

zipgrep -E "(wordA|wordB)" file.zip

on a zip file which I know it contains bot words within its files, but it returns nothing, if I uncompress the file and run egrep, it works fine 🤯

Edit: fixed the command again bc apparently I can't type

#grep #egrep #help #askFedi #linux

I guess my question is, would there be any reason why alternation wouldn't work using zipgrep? As I understand it, zipgrep only uncompress and runs egrep on the contents, and whatever options (-E in my case, to get ERE) you pass to zipgrep, are supposed to be passed to egrep, but it doesn't seem to work here 🤷
So, finally had some time to debug this 👆
It turns out zipgrep escapes the pattern before passing it to egrep, for some reason. I've tried removing the highlighted pattern on the screenshot and alternation now works fine. I've also taken the chance to replace egrep with rg (thanks @fmo for the suggestion!).
@j3j5 isn't zgrep for gzip files?
@fmo yes, I mistyped it, and just edited, I'm indeed using zipgrep, not zgrep.
@j3j5 I just add a quicklook and it seems that zipgrep is just a shell script wrapper around unzip and egrep, I think it's just unzipping and grepping anyway, you could maybe replace it by some faster combinations using unzip+ripgrep maybe?
@fmo interesting, I'll take a look, I kind of already have a script that works with all the caveats from zipgrep, but I'm really limited by not being able to use alternation, so you may be right. I'll give it a try later, thanks!
@j3j5 is this the exact command you used? Because you have a right brace there instead of a parenthesis.
@bioinfochat  damn, no, I just typed it, haha, I should've copypaste it.
@j3j5 if this is copy-paste you have mismatched parentheses (}