Comments (2)
I tried to work around this issue for the time being by vendoring this regex
project into my repo using this method. But then ran into a snag where it conflicted with the 0.18 Regex
package. If there was a way to simply import as Regex2 that would work. Next step is renaming all the occurrences of Regex
with Regex2
in my local copy. So this is another case for elm/compiler#1625.
from regex.
Hey, sorry you are running into trouble along these lines. Cases like yours are part of what motivated the new API! But this package is slated to come out with 0.19 due to a confluence of other factors. One thing you could do in the meantime is override what new RegExp
means in the context where you run Elm. Perhaps like this:
(function() {
function RegExp(str, settings) {
try {
return new window.RegExp(str, settings);
} catch(e) {
return /.^/;
}
}
// elm program
}())
Obviously this is not ideal at all, but coordinating an Elm release is quite tricky, and I think something like the code shown here may be the best thing viable until the release is possible.
from regex.
Related Issues (11)
- Deceptive documentation
- Regex.find with too lose regex HOT 1
- Regex.Options.unicode HOT 2
- Regex.toString
- Debug.log for Regexes does not show the regex
- Regression: capture groups should be able to match empty string HOT 1
- JavaScript heap out of memory error with empty string regex HOT 2
- `split` should include capture groups in results HOT 1
- Feature request: "escape" function
- Feature request: Some way to get invalid regex error message
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 regex.