Comments (3)
After a lot of research, it turns out most uses of PHP's preg_* methods are compatible with re2/golang's own regexp engine.
Conclusion: creating a "re2" ext that exposes golang's regexp engine and also weak (ie. overridable) preg_* methods should allow most PHP apps to work, and might even result in a security improvement as re2's linear time execution isn't subject to the class of attacks abusing pcre features.
from goro.
This looks interesting, but might be difficult to keep up to date (will depend on maintainer), also I see it uses a lot of unsafe.Pointer (I guess because of c2go), and running go test resulted in a crash ("fatal error: sweep increased allocation count" the second time, first time was about cgo and pointers).
I'm guessing this is not exactly production ready yet, but will definitely keep an eye on this.
from goro.
+1 for avoiding cgo whenever possible. Most apps dont rely heavily on regex so even if the pure go implementation is slower, it shouldnt matter.
I glanced over my old PHP projects and all of them use regex that's either compatible or can easily be translated to go's regex.
I think this is great!
from goro.
Related Issues (12)
- But why? HOT 1
- go get unrecognized import path "golang.org/x/text/language" HOT 2
- Implementation of various PHP methods in Go HOT 1
- make buildext standard/proc
- any plans of reviving this project? HOT 1
- 碉堡了,什么时候恢复、、??
- Documentation on concurrency. HOT 4
- core: filesystems & streams
- core: ini file parsing
- Support Wordpress
- undefined: sha3.NewLegacyKeccak256 & undefined: Values in macOS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goro.