7 ms·
I use regex101.com, which has a really great explanation feature, but it's not really built for 'search and replace'. You might want to take a look at it and se
by obihill 9y ago
I use regex101.com, which has a really great explanation feature, but it's not really built for 'search and replace'. You might want to take a look at it and see how you match up against it.
- btown 9y agoHighly recommend regex101 to anyone reading this. Multiple language support, colored highlights based on which group matched, a full-fledged debugger that steps through every character tested, and substitution with group references. That said, OP's solution has a much simpler interface, and if you like that kind of thing for focus, it seems like it's a great little app!
- obihill 9y agoThis has a simpler interface, yes. But, it took me a while to get comfortable with regular expressions, so the explanations of what was going on was like a built-in tutor, and apps like this definitely need this to be useful to learners.
- harrygeez 9y agoAnother vote for regex101. For those who didn't know it even runs offline ;)
- ridiculous_fish 9y agoWhat engine does regex101 use for JavaScript regexps? It seems to get all of the tricky cases right.
- helb 9y agoFrom their FAQ: For JavaScript, regex101 uses the browser's regex engine, so you may see different results on different browsers for the same test case. FAQ link: https://github.com/firasdib/Regex101/wiki/FAQ#how-close-does-regex101-emulates-the-engines https://github.com/firasdib/Regex101/wiki/FAQ#how-close-does... This is the actual service worker for JS regexps: https://gist.github.com/helb/6c9edb53d73489f85390f82826c2b084#file-javascriptworker-js-L36-L67 https://gist.github.com/helb/6c9edb53d73489f85390f82826c2b08...
- mranon99 9y agoIf you're not using regex101.com you are still living in the stone ages.