5 ms·
RegExr
- yboris 7y agoThis is always my go-to tool when I'm trying out RegEx!
- rudiv 7y agoSame, I'm a big fan.
- err4nt 7y agoBeautiful! I tried it with a particularly nasty regex from a codebase I had and it did a fantastic job explaining what it would target. It's similar to regex101.com in a lot of ways, but the UI might be a little more easy to read and understand.
- janpot 7y agoI usually prefer https://regexper.com/ https://regexper.com/. Especially when trying to make sense of regexes I come across in code I didn't write.
- jasode 7y agoI prefer regex101.com because that site assigns different colors to different capture groupings. I made a previous comment on this and why it's helpful: https://news.ycombinator.com/item?id=9581692 https://news.ycombinator.com/item?id=9581692 (For some reason RegExr.com is submitted to HN much more often than regex101.com. Is there a compelling advantage to RegExr that I've overlooked?)
- wodenokoto 7y agoI prefer regex101 too. I think it has fewer features, but it has the right features and is so easy to approach. I’m a big fan.
- leovander 7y agoAlthough it's overkill when I could have a reference sheet on my computer or on the wall, but I always remember that regexr has its cheat sheet on the side that I can easily get to. I use their cheat sheet more than the actual editor on their page. It looks like regex101 has it as well, but the regexr one is straight to the point (at least for me). https://i.imgur.com/Hg9jGOa.png https://i.imgur.com/Hg9jGOa.png
- United857 7y agoregexr is open source, unlike regex101.
- Toury2d 7y agoThat doesn't make it better.
- pcr910303 7y agoI love this tool. I have customized Emacs keybindings that open RegExr in a xwidget-webkit instance, type in regexes, and exit RegExr with the regex inserted at the cursor. Great for reading monstrous regexes or sharpening my regex skills.
- mattupstate 7y agoI've been using this website for years. It's been so long now that I can't even remember when Grant Skinner, the former Flash/ActionScript guru, released it. Nice to see it shared here.
- ekzy 7y agoFor ruby regex, I use https://rubular.com/ https://rubular.com/ Actually I use it for all platforms, and it works most of the time. If I notice that something is odd because the regex engine is different, then I'll use something else. But I really value Rubular's UI simplicity.
- svnpenn 7y agodoesnt support POSIX character classes. this should be preferred over `a-z` as the latter relies on users locale.
- x4nt 7y agoBeen using RegExr for years!
- tabs_masterrace 7y agoMe too! I have to admit I'm really bad at it and can never remember how the heck regular expressions work, but whenever I have to come up with something I just fiddle around in RegExr until it works. Documentation in the sidebar is super handy too.
- nabilmubarak 7y agoMy name is Leah Brown, I'm a happy woman today? I told myself that any loan lender that could change my life and that of my family after having been scammed separately by these online loan lenders, I will refer to anyone who is looking for loan for them. It gave me and my family happiness, although at first I had a hard time trusting him because of my experiences with past loan lenders, I needed a loan of $300,000.00 to start my life everywhere as single mother with 2 children, I met this honest and God fearing online loan lender Gain Credit Loan who helped me with a $300,000.00 loan, working with a loan company Good reputation. If you are in need of a loan and you are 100% sure of paying the loan please contact (gaincreditloan1@gmail.com)
- goerz 7y agoThe problem I have with all of these regex websites and tools is that they usually only use the regex dialect of whatever language they’re written in. Or at best, a very incomplete list of dialects. Subtle differences between dialects matter a lot. Personally, I would need at least Perl, Python, GNU utils (with and without -E), BSD utils (or whatever comes with macOS, again with and without-E), and vim with the various settings for “magic”. Ideally, they would also be able to convert between all these dialects.
- 1f60c 7y agoSounds like a fun side project :D
- LameRubberDucky 7y agoIf you were on Windows, you could try RegexBuddy. It supports regex dialects for: .NET, Boost (C++), Delphi, Groovy, Oracle Database, PowerShell, R, std::regex, VB6, wxWidgets, C#, MySQL, PHP, PostgreSQL, VBScript, Java, Perl, PCRE, JavaScript, Python, Ruby, Tcl ARE, POSIX BRE, POSIX ERE, GNU BRE, GNU ERE, XML Schema, and XPath. It will even generate code snippets for you based on the regex you create with the tool. It can also convert between these dialects and lets you know if features in the target dialect are not available. I am not associated with this company in any way, just a long time user.
- goerz 7y agoThat does look impressive! I'm tempted to check how well this runs in Wine (since I'm not a Windows user)
- las_balas_tres 7y agoRegexBuddy is a fantastic piece of software. It also runs fine under Wine.
- jonny_eh 7y agohttps://regex101.com/ https://regex101.com/ supports 4 dialects. Certainly not exhaustive, but very handy none-the-less.
- ollerac 7y agoThis is nice, but my go to tool is: https://www.debuggex.com/ https://www.debuggex.com/ Not only does it tell you what everything means, but it visually displays it in a way that just makes sense.
- zamadatix 7y agoThis is always the one I forget about and have a hard time finding. It's not really great for editing but it's probably the best display I've seen in regards to debugging large regex.
- irrational 7y agoMy favorite is https://regex101.com/ https://regex101.com/ But I've found all of the following to be useful: http://regexone.com/ http://regexone.com/ http://www.regexpal.com/ http://www.regexpal.com/ http://www.rexegg.com/ http://www.rexegg.com/ http://regexr.com/ http://regexr.com/ https://www.debuggex.com/ https://www.debuggex.com/ https://regexper.com/ https://regexper.com/ https://www.regular-expressions.info/ https://www.regular-expressions.info/ http://www.cheatography.com/davechild/cheat-sheets/regular-expressions/ http://www.cheatography.com/davechild/cheat-sheets/regular-e... http://eloquentjavascript.net/09_regexp.html http://eloquentjavascript.net/09_regexp.html http://www.smashingmagazine.com/2009/06/essential-guide-to-regular-expressions-tools-tutorials-and-resources/ http://www.smashingmagazine.com/2009/06/essential-guide-to-r... http://www.smashingmagazine.com/2009/05/introduction-to-advanced-regular-expression http://www.smashingmagazine.com/2009/05/introduction-to-adva... https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guid... http://codylindley.com/techpro/2013_05_14__javascript-regular-expression-/ http://codylindley.com/techpro/2013_05_14__javascript-regula...
- tabtab 7y agoI find RegEx's a bit cryptic. Sure, with enough practice one can read them, but I'd like an alternative that can easily break out chunks as named units. One can then reference the named units to compose new named units. Divide-and-Conquer. I'd like to see experiments in alternatives that provide this. It could help do for RegEx's what SQL's WITH statement did for long SQL statements. Backus–Naur Form could act as a starting point, but it needs some syntactic adjustments to make it more compact and practical, in my opinion. Partial example: Side = VarFunc + Segment*; Segment = ":" + Varfunc | (":" + VarFunc)[0..1] + "{" + "}" | (":" + Varfunc)[0..1] + "{" + Base + (";" + Base)* + "}"; Letter = ('a'..'z'|'A'..'Z'); ForbiddenChar = $anyChr("/?#%"); /* Legend: [x..y] = quantity of repeats (substitute letters with integers) [0..n] = zero, one, or multiple * = shorthand for [0..n] | = "or" + = concatenation, ignores white-space ++ = concatenation, excludes white space +w+ = concatenation, must have white-space between 'x'..'y' = character falls within range $x() = special function or constant, where "x" is a name. */
- tosh 7y agoThere is a concept of named capturing groups: https://www.regular-expressions.info/named.html https://www.regular-expressions.info/named.html
- earenndil 7y agoLook at perl6 grammars.
- tabtab 7y agoIt looks extensive, but perhaps may be overkill for a common regex alternative. Thanks for the tip, though. A standard or semi-standard would have to start simple.
- btilly 7y agoIt sounds like you would like https://en.wikipedia.org/wiki/SNOBOL https://en.wikipedia.org/wiki/SNOBOL. Though if you had to do enough work with text, my bet is that you'd eventually figure out why regexes won. They are simple, straightforward, and just enough to tackle the occasional matching problem on your way to doing something else.
- dang 7y agoPosted many times but the large threads are: 2017 https://news.ycombinator.com/item?id=13599952 https://news.ycombinator.com/item?id=13599952 2015 https://news.ycombinator.com/item?id=9581225 https://news.ycombinator.com/item?id=9581225 2014 https://news.ycombinator.com/item?id=7537189 https://news.ycombinator.com/item?id=7537189 Already in 2008 the comments were listing others: https://news.ycombinator.com/item?id=277657 https://news.ycombinator.com/item?id=277657
- jedberg 7y agoWhy is there a sudden explosion of posts about regex in the last few days? Did something newsworthy happen that I missed, or is it more of a "I saw the post last week and then found this cool related thing" bandwagon effect?
- LeonB 7y agoI thinks it’s the latter. If there is a major news item involving regular expressions, we’re all ready to pounce, ala: https://xkcd.com/208/ https://xkcd.com/208/
- KenanSulayman 7y agoSomething I can recommend to both experienced and "new developers" alike is https://regexper.com https://regexper.com. It generates clear graphs from regular expressions making immediately clear what they do.
- boomskats 7y agoregex101.com lets me have client-side validation without requiring a network connection, so it's way more useful to me than regexr (although the regexr UI is nice and I like their github repo).
- proactivesvcs 7y agoI can highly recommend the following tool: Mastering Regular Expressions by Jeffrey Friedl http://shop.oreilly.com/product/9780596528126.do http://shop.oreilly.com/product/9780596528126.do I found the pacing to be excellent, with complimentary exercises and that it was educational as both a cheatsheet and a coherent text. Learned a lot from it, despite being experienced from the outset.
- throwaway5389 7y agoOne thing that's always perplexed me is the variants of regex and their differences - is there any write up that defines the majority of them?
- deleted 7y ago[deleted]