Live data from Hacker News

Show HN: RegEx for Regular Folk – A visual, example-based introduction

refrf.shreyasminocha.me

91–100 of 113 posts

Re: Show HN: RegEx for Regular Folk – A visual, example-based introduction

#91

Great regex tutorial: https://www.princeton.edu/~mlovett/reference/Regular-Express... Good regex book: https://www.amazon.com/gp/product/0596528124/ Good regex website: https://www.regular-expressions.info/ Interesting regex links: https://github.com/aloisdg/awesome-regex

On the implementation's side, Russ Cox's articles are pretty indispensable:

https://swtch.com/~rsc/regexp/regexp1.html

https://swtch.com/~rsc/regexp/regexp2.html

And actual implementations based on these articles: https://github.com/google/re2 and https://github.com/rust-lang/regex

Re: Show HN: RegEx for Regular Folk – A visual, example-based introduction

#92
post #78

I think what regex's need is a really powerful syntax and language aware regex editor. I've been using regexs for most of my career, and still struggle to get them right on first writing. The #1 problem I run into is: what is a literal character and what is a control character? for example, both these are very common: - match a parenthesis character or a period character - use a parenthesis to group a match or use a…

RegExBuddy comes to mind.

Re: Show HN: RegEx for Regular Folk – A visual, example-based introduction

#93
post #91

Great regex tutorial: https://www.princeton.edu/~mlovett/reference/Regular-Express... Good regex book: https://www.amazon.com/gp/product/0596528124/ Good regex website: https://www.regular-expressions.info/ Interesting regex links: https://github.com/aloisdg/awesome-regex

On the implementation's side, Russ Cox's articles are pretty indispensable: https://swtch.com/~rsc/regexp/regexp1.html https://swtch.com/~rsc/regexp/regexp2.html And actual implementations based on these articles: https://github.com/google/re2 and https://github.com/rust-lang/regex

More articles and notes from Russ Cox: https://swtch.com/~rsc/regexp/

Re: Show HN: RegEx for Regular Folk – A visual, example-based introduction

#94
post #78

I think what regex's need is a really powerful syntax and language aware regex editor. I've been using regexs for most of my career, and still struggle to get them right on first writing. The #1 problem I run into is: what is a literal character and what is a control character? for example, both these are very common: - match a parenthesis character or a period character - use a parenthesis to group a match or use a…

The biggest problem I've noticed for regex is we use it every once in a while and once it works we move onto other things. And a few weeks/months later, we have forgotten much of it and have to relearn it all over again. Whereas, you generally use your programming language ( C++, C#, Java, etc ) everyday to keep your skills sharp, regex is generally "set it and forget it" situation for most people. And as you noted, different languages/shells/etc implement their own flavor of regex which can trip you up.

It's similar to SQL when you think about it. You set up a query to get the data you need and move on to other things. And every RDBMs implements their own flavor of SQL which can complicate things.

Re: Show HN: RegEx for Regular Folk – A visual, example-based introduction

#95
post #78

I think what regex's need is a really powerful syntax and language aware regex editor. I've been using regexs for most of my career, and still struggle to get them right on first writing. The #1 problem I run into is: what is a literal character and what is a control character? for example, both these are very common: - match a parenthesis character or a period character - use a parenthesis to group a match or use a…

The biggest problem I've noticed for regex is we use it every once in a while and once it works we move onto other things. And a few weeks/months later, we have forgotten much of it and have to relearn it all over again. Whereas, you generally use your programming language ( C++, C#, Java, etc ) everyday to keep your skills sharp, regex is generally "set it and forget it" situation for most people. And as you noted,…

> And a few weeks/months later, we have forgotten much of it and have to relearn it all over again.

This has been exactly my situation. I love regex because it's so powerful but damn do I hate working with it due to the relearning process.

Re: Show HN: RegEx for Regular Folk – A visual, example-based introduction

#96

Hey this is great! I noticed that in the "Escapes" chapter, the "Next" link at the bottom of the page goes back to the introduction when it should go to "Groups". I poked around in your repo to try and submit a pull request, but I can't tell where the edit needs to go; the meta.json file seems to have an array with the right chapter headings which was my guess about the problem. Anyway, there is a typo. Sorry I can't…

Yep! Sorry, I broke that late last night. I've fixed it with https://github.com/shreyasminocha/regex-for-regular-folk/com....

It was fairly unintuitive for someone unfamiliar with the source, so no worries :D

Re: Show HN: RegEx for Regular Folk – A visual, example-based introduction

#97

It seems the “next” button is not working on mobile safari on ios 13. It just reloads the page you’re in. Tried with and without content blockers. However from what i quickly read from the links on the front page, the tutorials itself seem really high quality!

Fixed it! Thanks.

Re: Show HN: RegEx for Regular Folk – A visual, example-based introduction

#99
post #79

Earlier quoted context omitted.

> is there a simple way to get this on one a single page and make it easier to print? That's on my TODO! - https://github.com/shreyasminocha/regex-for-regular-folk/iss... - https://github.com/shreyasminocha/regex-for-regular-folk/iss... I was having some trouble with wkhtmltopdf, but I'll try to figure this out ASAP.

I don't know what that is but just having all html pages merged into one would be enough and super useful for me and my printing purposes, and probably good for web UX too. Keep up the good work mate

There it is! https://refrf.shreyasminocha.me/book

Printing instructions are on the home page.

Re: Show HN: RegEx for Regular Folk – A visual, example-based introduction

#100
post #78

I think what regex's need is a really powerful syntax and language aware regex editor. I've been using regexs for most of my career, and still struggle to get them right on first writing. The #1 problem I run into is: what is a literal character and what is a control character? for example, both these are very common: - match a parenthesis character or a period character - use a parenthesis to group a match or use a…

Does this help? https://regex101.com

Or an alternative open source one that you can self-host is https://github.com/gskinner/regexr and https://regexr.com/
Post reply on HN