Comments (5)
That pattern results in an exponential growth for the search cost. That is, every additional character in the Text costs exponentially more than the one before it to run the search.
Safari and Firefox limit the maximum search time, but Chrome and IE do not. For me, about 90 characters is where it becomes noticeably slow, and by the time you hit 100 it's crashing. This only seems to happen if there are spaces in the string.
Unfortunately, regex execution is a black box, so we can't really handle this case. Feel free to report it to the Chrome and IE teams, and hopefully they will address it in future builds.
It might be possible to push it to a worker, and then terminate it if it takes too long. I'm not sure whether termination would work with a runaway internal process. Worth looking into, particularly if we add support for asynchronous results in preparation for supporting other flavours.
I'll leave this open for now.
from regexr.
Thanks for the quick and detailed reply.
from regexr.
As an update to this, we just merged in a fix that uses Workers. We're still tweaking the related UI, but it should push live in the next week or so.
from regexr.
That was quick thanks for the update. Will try it out soon.
from regexr.
This update just went live. Thanks again for the report.
from regexr.
Related Issues (20)
- Feature request: Special characters display in Tools tab
- Integrate ReDoS checking
- Using named capture groups in list and replace
- Full match not working with some `or` based checks.
- Issue with the online tool on mobile
- PCRE engine matches รค (ASCII char 228) to other diacritics
- Separator not working for list tool for PCRE patterns
- Issue with Regex Tool's Lack of Support for Lazy Quantifier "{,M}" Without Lower Limit HOT 2
- Site is down with "connection timed out, Error code 522" HOT 1
- Support for `v` (`unicodeSets`) and `d` (`hasIndices`) flags HOT 3
- Support for named backreferences `\k<...>`
- i love you, whoever made this.
- \n not working as expected HOT 1
- Global indicator not working in tests HOT 1
- When nearby matches are present, hard to see visually.
- full match not working in test
- can't build it? HOT 1
- Hide Text/Tests pane
- Explain PCRE modes like `(?i)` more
- Feature request: Paste lines to be used for tests HOT 2
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 regexr.