Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm making an algebraic filter that looks a lot like grep. Doing it in c++.

the python one lets you go through a log file and filter the lines out based on statements like...

You can currently use it to say "give me all lines that contain "substrA" and "substrB" but not "substrC" or "substrD"."

This current python implementation can only do AND for requirements, and OR for negative requirements.

But, I realized that I wanted to do a filter that could handle things like "give me all the lines that contain ... ("substrA" or "substrB") AND ("substrC" or "substrD")" and that was when I realized that it needs to be an algebraic system.



Sounds useful. I have repeatedly hit this limitation of regex filtering.


It would really be neat if you could use regex inside of the algebra. Right now it just does a string match.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: