Live data from Hacker News

Learn RegEx step by step, from zero to advanced

regexlearn.com

91–100 of 114 posts

Re: Learn RegEx step by step, from zero to advanced

#91

I've had RegexBuddy installed on my computer for so long. It's been part of my basic dev setup for years: https://www.regexbuddy.com/ I used to use it a lot, although I've not used it in quite a while. I don't recall the last time I even needed to write a regex. Somehow it's still stuck in my head. Well worth having it if you want a tool to hack around large blocks of text and play with regex in a "live" environment.

$40 is a bit steep, but I'd probably be willing to pay for a Linux version.

Re: Learn RegEx step by step, from zero to advanced

#92
post #8

>Regular Expressions, abbreviated as RegEx or RegExp, are a string of characters created within the framework of RegEx syntax rules. You can easily manage your data with RegEx, which uses commands like finding, matching, and editing. Regex can be used in programming languages such as Phyton, SQL, Javascript, R, Google Analytics, Google Data Studio, and throughout the coding process. Learn regex online with examples a…

I think regex is absolutely terrible garbage. It’s very powerful, I do appreciate not having to write complex conditional statements, and it’s great that it’s available is so many languages and applications. But it’s just a bad tool, terribly unreadable, easy to introduce bugs, with lots of trial and error. It has too much brevity and would be much better if it were longer but more human readable. I’m sure there are…

It’s just a small programming language.

Re: Learn RegEx step by step, from zero to advanced

#93
post #8

>Regular Expressions, abbreviated as RegEx or RegExp, are a string of characters created within the framework of RegEx syntax rules. You can easily manage your data with RegEx, which uses commands like finding, matching, and editing. Regex can be used in programming languages such as Phyton, SQL, Javascript, R, Google Analytics, Google Data Studio, and throughout the coding process. Learn regex online with examples a…

> They describe what regex's are, but none of the info is going to make much sense to someone who doesn't already know why they would want to learn them. I frequently use the journalist's "5 Ws and H" framework as a checklist procedure for ensuring my technical communication covers fundamental questions/ideas: * Who * What * Where * Why * When * How The slightly tricky thing is that you have to formulate a question f…

That's a helpful list / framework. Thanks.

That said, where I see most tech sites / products fail is on addressing benefits. Why should I care? (As opposed to the brand or product why.)

I wish I had $20 for every "Looks cool. But it's not clear to me my life will be any better."

Re: Learn RegEx step by step, from zero to advanced

#95
post #8

>Regular Expressions, abbreviated as RegEx or RegExp, are a string of characters created within the framework of RegEx syntax rules. You can easily manage your data with RegEx, which uses commands like finding, matching, and editing. Regex can be used in programming languages such as Phyton, SQL, Javascript, R, Google Analytics, Google Data Studio, and throughout the coding process. Learn regex online with examples a…

I think regex is absolutely terrible garbage. It’s very powerful, I do appreciate not having to write complex conditional statements, and it’s great that it’s available is so many languages and applications. But it’s just a bad tool, terribly unreadable, easy to introduce bugs, with lots of trial and error. It has too much brevity and would be much better if it were longer but more human readable. I’m sure there are…

The readability isn't so bad if you let yourself allocate as much time and mental effort to understanding the one-line regex as you would use to understand the 100 line string-processing function that it replaces. And the brevity makes regexes handy on the command line and in single-line input fields in text editor search functions.

I do prefer using parser combinators for more complex tasks.

Re: Learn RegEx step by step, from zero to advanced

#96
post #55

Earlier quoted context omitted.

I think regex is absolutely terrible garbage. It’s very powerful, I do appreciate not having to write complex conditional statements, and it’s great that it’s available is so many languages and applications. But it’s just a bad tool, terribly unreadable, easy to introduce bugs, with lots of trial and error. It has too much brevity and would be much better if it were longer but more human readable. I’m sure there are…

Ignoring the flame bait, for me the only things I wish more regex engines supported (cough JavaScript) is the ability to ignore whitespace, and have named groups. Python has a flag to do this, and being able to have multi-line regexes with comments and named groups is phenomenal and greatly improves readability of more complex regexes. In general I would say ~70% of regexes are highly readable. With tools like the ab…

> Ignoring the flame bait, for me the only things I wish more regex engines supported (cough JavaScript) is the ability to ignore whitespace, and have named groups.

Irregex? http://synthcode.com/scheme/irregex/

Re: Learn RegEx step by step, from zero to advanced

#97

I respect regex for being a widespread DSL that makes certain things very declarative. My problem with it (other than all the different flavors—that’s just history’s fault) is that you don’t tend to get integrated help/tool support for them. They are often just plain strings—how is e.g. Intellij supposed to spot them reliably and help you? It’s too bad if we have to copy and paste regex strings into websites in order…

> They are often just plain strings—how is e.g. Intellij supposed to spot them reliably and help you?

WebStorm or any IDE that has WebStorm functionality built-in can detect `/pattern/` in Javascript and give you an option to test it and warn you of syntax errors. PyCharm will help you with functions in `re` module, Rider with `Regex.IsMatch` and so on, all JetBrains IDEs have some sort of contextual help that gives you guidance on stdlib functions that accept regular expressions.

https://www.jetbrains.com/webstorm/guide/tips/check-regex/

Re: Learn RegEx step by step, from zero to advanced

#98
At first glance this looks like software that’s a bit dated and nothing special, but try to use it just once and tell me if you don’t agree it’s freaking awesome when do you want to create an expression or get a feel for exactly how it’s working.

I have no affiliation with these guys, I’ve just been impressed over the years

https://regexbuddy.com

Re: Learn RegEx step by step, from zero to advanced

#100

[0] Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. I love regular expressions and figuring out the syntax to solve problems I encounter where I can use regex. Such as searching code for calls with specific named params that may be in different order across the code base. But I always have this quote in the back of my mind if I'm thinking about us…

I once asked my friend: "Is there anything Regex can't do?" He replied: "Work the first time?"

And that's how I always think of Regex now. It's an incredibly powerful tool that I pull out pretty often, but if I'm doing anything beyond the most basic pattern matching I know I'm about to lose a bit of time questioning my abilities and sanity.

Post reply on HN