Code Monkey home page Code Monkey logo

Comments (5)

dlclark avatar dlclark commented on August 17, 2024

I’m assuming gostd.regexp is the go standard library regexp package.

This package isn’t designed to be a drop-in replacement for the standard library.

At first blush a conversation layer doesn’t seem too difficult so it seems like a project that requires swapping between them could write a normalization layer.

Have you tried writing this layer yourself and run into problems? Are there specific functions or concepts from regexp you want that aren’t present in regexp2?

from regexp2.

vipally avatar vipally commented on August 17, 2024

https://gitee.com/gxlb/gogp/blob/dev_gt/syntax.go#L52
I am doing some heavy regexp processing, what need back-reference syntax from regexp library, which is not supported by std.regexp.
I found regexp2 meet all what I need.

I have try to export this APIs at https://gitee.com/gxlb/gogp/blob/dev_gt/vendor/github.com/dlclark/regexp2/regexp_api.go
But failed today, I'll try latter.
It will be greatfull if regexp2 directly adapt all APIs from std.regexp library.

from regexp2.

vipally avatar vipally commented on August 17, 2024

https://gitee.com/gxlb/gogp/blob/dev_gt/vendor/github.com/dlclark/regexp2/std_regexp_api.go
I have sucessfully replaced std.regexp with regexp2.
When I finish adapt other unused APIs, may I put a PR to regexp2 to compatibility with std.regexp APIs?

from regexp2.

dlclark avatar dlclark commented on August 17, 2024

Sure! Be sure to document the compatibility goal in the README and include tests.

from regexp2.

vipally avatar vipally commented on August 17, 2024

Here is something that I want to do on regexp2 next:

  1. Add compatibility with std.regexp APIs
  2. Add coverage test cases
  3. Add examples of APIs usage

from regexp2.

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.