Code Monkey home page Code Monkey logo

Comments (10)

tavianator avatar tavianator commented on August 30, 2024 2

regex is not a superset of either Posix BREs or EREs, since they both support back-references ((f)ire\1ox) while regex does not. I agree a comparison table would be nice.

Our glob implementation converts globs to Posix BREs, so any POSIX-compatible regex implementation gets us globs for free: https://github.com/uutils/findutils/blob/main/src/find/matchers/glob.rs

from findutils.

tertsdiepraam avatar tertsdiepraam commented on August 30, 2024 1

Yeah, compatibility is generally why we use onig instead of, say, the standard regex crate. I think we could probably make it optional as the additional features aren't used that much (in coreutils as well). It'd be great if there was some regex api that allowed us to switch with just a feature flag and wouldn't require us to write both versions everywhere.

from findutils.

lu-zero avatar lu-zero commented on August 30, 2024

ripgrep abstracted quite a bit so it can use pcre2 or regex.

from findutils.

tavianator avatar tavianator commented on August 30, 2024

https://gitlab.redox-os.org/redox-os/posix-regex might be a good option

from findutils.

lu-zero avatar lu-zero commented on August 30, 2024

I was convinced that regex supports a superset of the posix one. Probably would be good to make a table of what is supported and what is not. And do the same for the glob crates...

from findutils.

lu-zero avatar lu-zero commented on August 30, 2024

onig is still not updated, and clang-16 is going to hit more distributions. Given that upstream seems unresponsive should we start looking for alternatives more actively?

from findutils.

tertsdiepraam avatar tertsdiepraam commented on August 30, 2024

Am I missing some part of the conversation? What's going on with clang-16?

from findutils.

lu-zero avatar lu-zero commented on August 30, 2024

clang-16 makes onig non-buildable, I sent a patch to fix it more or less as I opened this issue.

from findutils.

tertsdiepraam avatar tertsdiepraam commented on August 30, 2024

Oh that's unfortunate. I wonder if https://crates.io/crates/fancy-regex be a good alternative?

from findutils.

brisingraerowing avatar brisingraerowing commented on August 30, 2024

That explains the error I'm getting when building this using MSYS2 / UCRT64, as that project recently updated to Clang 16.

from findutils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.