13 ms·
RegExr: A website for interactive regex prototyping with syntax highlighting
- anon3_ 11y agoAuthor: - When did you begin this? - What front-end JS framework did you program this in? - How many visitors do you get per day?
- tux 11y agoThis official repo might help; https://github.com/gskinner/regexr/ https://github.com/gskinner/regexr/
- m_t 11y agoYou will probably get some info from the author's blog: http://blog.gskinner.com/archives/2014/03/regexr-v2-build-test-learn-regular-expressions.html http://blog.gskinner.com/archives/2014/03/regexr-v2-build-te...
- nodesocket 11y agoRegExr looks really nice, but my go to is still http://rubular.com http://rubular.com.
- anon3_ 11y agoWhat do you think makes it better? I think the UX on rubular is much cleaner. Don't they both serve a different flavor of regex?
- ghayes 11y agoFor me, it's lightning fast with no clutter. I just want quick verification that the regex I'm writing matches a few samples. Explaining to me that `+` matches "one or more of the preceding group" adds no value.
- bradleyland 11y agoRubular uses Ruby's regex engine (Oniguruma/Onigmo). Regexr uses your browser's RegEx engine. That doesn't make it "better", but it does mean they have slightly different purposes. You can use Ruby specific regex features with Rubular, so it is "better" for Ruby regex development. As a general principle, I like to test against the same regex engine that I'll use in production. If I'm writing Ruby, I'll use pry/irb or a tool like Rubular. If I'm writing Javascript, you'll find me in the closet with the barrel of a gun in my mouth... I mean, I'll test against my target browsers using their respective web inspector, or use a tool like RegExr. An example of the differences in the engines, the Onigmo engine supports conditional sub-patterns: Rubular: http://rubular.com/r/zUwSsIi117 http://rubular.com/r/zUwSsIi117 Regexr: http://regexr.com/3b1vn http://regexr.com/3b1vn As far as browsers go, they're actually pretty close most of the time. ECMA specifies regex (I think), so if you stick to the ECMA standard, you should be fairly safe. As with anything in browser-land, you'll encounter edge-case inconsistencies that will bite you in the ass.
- silentrob 11y agoRubular is my go to as well, even though I primarily write JS expressions and there are some gotcha. Having the numbered capture groups and clean simple interface is amazing. I also test and create tiny urls embedded in my code to show how the expression work. Handy for coming back later and making changes. I don't doubt there is something better, but it is still hard to change.
- mraison 11y agoNice work :) Looks like this tool puts the emphasis on the pedagogical aspect. For development, the most fantastic tool that I know of in this space is debuggex. Here is an example with roman numbers: https://www.debuggex.com/r/Xqlv3QcAuw_EgPSM https://www.debuggex.com/r/Xqlv3QcAuw_EgPSM
- ttty 11y agoI really love this one!
- zatkin 11y agoDude, that is way cool. This is like one step away from FSMs.
- tsergiu 11y agoYou can step through the FSM on Debuggex by using the sliders :)
- roryhughes 11y agoOut of all the links posted in this thread, https://www.debuggex.com/ https://www.debuggex.com/ is by far the best especially because of it's visualisation.
- jgalt212 11y agoI think Regulex actually has a nicer visualizer, but it lacks all the other features of debuggex and regexr. https://jex.im/regulex/ https://jex.im/regulex/
- alexcason 11y agoI've been using RegExr for years, it's the first place I go to when I have a tricky regular expression to put together. It works really well.
- rcaught 11y agoMy favourite is still https://regex101.com https://regex101.com Example regex: https://regex101.com/r/wY0rM7/1 https://regex101.com/r/wY0rM7/1
- psk 11y agoSites like this is great and all, but I wish they included some commonly used regexes. Like a list of 'good' regexs to validate phone numbers, emails and other common stuff. It would actually be pretty cool to have a site like this except you could add the regex to a list, and then people could upvote the regexe depending on the quality of it.
- psk 11y ago...and I just checked the community link. Way to go :-)
- addandsubtract 11y agoThere's also http://www.regxlib.com/ http://www.regxlib.com/
- deleted 11y ago[deleted]
- ddebernardy 11y agoYou can only validate a zip code, a phone number, an address, or an email address using a regex up to a point. There are too many dispartities from a country to the next for the first three to hope validating anything withhout a bunch of false negatives. Some countries don't have zip codes. For emails, blindly following the RFCs yields a monster (see [1]), and it won't help you if you run into oddball email addresses that are not RFC-compliant but work regardless due to technical implementations (or vice versa). http://regular-expressions.mobi/email.html http://regular-expressions.mobi/email.html
- rane 11y agohttp://refiddle.com/ http://refiddle.com/ is a similar service I've found useful.
- kachhalimbu 11y agoMy favorite is regulex[1] a visual explanation of regex [1] https://jex.im/regulex https://jex.im/regulex
- addandsubtract 11y agohttp://regexper.com/ http://regexper.com/ does the same thing. I just wish there was something like this in reverse. Somewhere I can drag and drop the visual nodes and have it return the regex string to me.
- vbezhenar 11y agoWhat I am missing is some kind of service to convert between different types of regexes. Like Java, Intellij Idea Search&Replace, vim, less, grep, egrep, sed. There are subtle (and sometimes not so subtle) differences between them which I always forgetting and have to trial&error a bit. I wish there would be one single standard to regexes. Great tool but difficult to use because of many incompatible implementations.
- crdoconnor 11y agoI've tried a number of these and this is the one I've gotten along with best: http://jsregex.com/ http://jsregex.com/ Simple, minimalist, takes up all available space in the viewport & also works offline if you save the page.
- romankolpak 11y agoI have been a regular user of this website for quite some time now. I like the UI and usability is great. Also, https://regex101.com https://regex101.com is very good alternative
- gmac 11y agoSuggestion: allow use of extended regexps too (I have a quick JS function to enable this, which you can regard as public domain: http://blog.mackerron.com/2010/08/08/extended-multi-line-js-regexps/ http://blog.mackerron.com/2010/08/08/extended-multi-line-js-...).
- verytrivial 11y agoI've been programming for about two decades. I had composed three regexes before my first coffee and before seeing this article this morning. My problem: I still don't have a good mnemonic to remember how magic differs grep, egrep, vim, awk, Perl, Python, etc. If that this site had modes and flavoured cheat-sheets I would live there!
- cool-RR 11y agoI use RegexBuddy, it has a shitload of different modes.
- amelius 11y agoCan it also translate regexes from one flavor to another?
- wrath 11y agoI love and miss RegexBuddy! If only they had a Mac/Linux version :( I've had thoughts about switching back to Windows while developing complex regular expressions.
- speedkills 11y agoRegexbuddy can be run on a Mac using Wine.
- XorNot 11y agoProbably my favorite tool on the internet. One thing I wish it had was an implicit select option like grep -o since I frequently find myself using it to do interactive text manipulations for one offs.
- nathancahill 11y agoMy favorite for Python is still http://www.pyregex.com/ http://www.pyregex.com/
- amenghra 11y agohttp://regexp.quaxio.com/ http://regexp.quaxio.com/ tries to act as a linter.
- janfoeh 11y agoWill be bookmarked alongside my other regex helpers. One of my other favourites: https://jex.im/regulex https://jex.im/regulex , a regex visualizer.
- thomasfl 11y agoI really like the regexp syntax coloring. What makes me still reach out for rubular.com, is actually the regexp cheat sheet on the bottom of the page. After 25 years, I still like to have a cheat sheet for regexp to remember all the swithces etc.
- teddyh 11y agoemacs M-x regexp-builder
- chdir 11y agoI had the older version bookmarked http://gskinner.com/RegExr/ http://gskinner.com/RegExr/ which now redirects to this site. Some other good sites that I've used are: http://regviz.org/ http://regviz.org/ https://regex101.com/ https://regex101.com/ http://osteele.com/tools/rework/ http://osteele.com/tools/rework/ http://www.rexv.org/ http://www.rexv.org/ https://www.debuggex.com/ https://www.debuggex.com/
- myfonj 11y agoI'd add http://regexpal.com/ http://regexpal.com/ for historical completeness. It's the first such tool I used and prefer it even today. Very sad that from what it seems Steven Levithan sold entire domain recently and is not updated anymore. Even permalinks broke last year. (I'm a bit worried, what's up with Steven.)
- coob 11y agoRegex 101 is fantastic, I love how it provides a plain english explanation.
- jasode 11y agoUnfortunately, RegExr does not color-code the different capturing groups. For example, replace the RegExr sample regex with "([A-Z])\w+\s\w(\d.\d)" and compare[1][2] its color coding capability to the other regex helpers. The other sites such as regex101.com & debuggex.com will delineate the capture groups within the matched text using different colors. This is very helpful for complex captures because making the boundaries visible can reveal bugs in your thinking of what substrings the regex is actually capturing. (I don't intend to be negative. If capture group color-coding is an easy coding enhancement for RegExr, consider my comments as mentioning a minor nit.) [1]https://regex101.com/r/eB5jY1/1 https://regex101.com/r/eB5jY1/1 [2]https://www.debuggex.com/r/mci3WLNmHGTEatf6 https://www.debuggex.com/r/mci3WLNmHGTEatf6 (couldn't find a way to enable /g global on debuggex.com (even tried PCRE option) but color boundaries still show up on the 1st capture group)
- logicallee 11y agothis seems incredibly easy to add given what they're done - just send a note to the author. I can't imagine how it wouldn't take seconds to implement.
- myfonj 11y agoIt is actually true for PCRE (PHP), Python, and and a bit for non-global Javascript regex. For global matches in JS it is, I dare to say, incredibly difficult, if not impossible. I haven't seen visualised submatches in JS anywhere. I'd be happy to be mistaken and corrected. So go on, try it right away :] I think it might be possible to get it done with breaking original regexp into group tree and look what each part did on concrete match from global search using non-global match on local instances. You'd need own regex parser and watch out for deep nesting.
- logicallee 11y agoThen I think I misunderstood what jasode was asking. Specifically, the example (our link) already names groups if you hover over matching text (group #1, etc) - I thought they were just asking for the highlight color to correspond to the group # listed.
- euan_torano 11y agoFor anybody doing .NET development, RegexHero (http://regexhero.net/tester http://regexhero.net/tester) is nice. It uses Silverlight though...
- alz 11y agothis has been posted a few times, but is a great resource
- hienchu 11y agoThis is awesome, but I like https://regex101.com/ https://regex101.com/ more
- jbrooksuk 11y agoRegExr is my go to regular expression playground. I've been using it for many years, back when it was on http://gskinner.com/RegExr http://gskinner.com/RegExr It's evolved a lot since then :)
- r4pha 11y agoCool! These are the same guys behind CreateJS. Amazing work as well.
- notlisted 11y agoMy favorite tool for quick regex definition to text extraction is http://txt2re.com/ http://txt2re.com/ Paste a sample line, mark the parts you like, it generates a piece of code to extract just those parts. Has saved me hours.
- Elrac 11y agoSorry if this information is visible somewhere: Which dialect of regexp does RegExr "do?" In the past, when I've looked for a good Internet RegEx test site, I've had trouble finding one that "does" the Java dialect.
- paradox95 11y agoThis has been my go to regex testing site for years. Absolutely love it.
- kyberias 11y agoIs there a service that would allow one to enter positive matches and negative matches and it would then deduce a regex suggestion for that?
- gnrlbzik 11y agoI've been looking for something like this on mac since I moved away from windows long time ago, no RegEx Buddy, such a great tool too. I think that I discovered regexr a year ago. This is such a great tool. Much appreciated work from @gskinner and community.