Live data from Hacker News

Just released a major update for my site. What do you guys think?

regex101.com

61–70 of 78 posts

Re: Just released a major update for my site. What do you guys think?

#61
Nice, this could be really useful for beginners. I tried the "random regexp" feature and it showed one that used \P and \P, among other things. I have used named capture groups a bit I wasn't aware of these, and was wondering where they came from.

Which leads me to the problem I had with the site.

I was hoping for a way to easily (one click) get to the documentation for each of these. It seemed strange that a given name pattern could work for any human language, so I was trying to work out how this would be done. Eventually I found the tables at the bottom (with Advanced and Tricks tabs) but clicking on the links in there just adds the items to my current expression.. what I was hoping for was a direct link to some docs for the specific item (not a general link to the top level of some huge document).

Re: Just released a major update for my site. What do you guys think?

#65
post #61

Nice, this could be really useful for beginners. I tried the "random regexp" feature and it showed one that used \P and \P , among other things. I have used named capture groups a bit I wasn't aware of these, and was wondering where they came from. Which leads me to the problem I had with the site. I was hoping for a way to easily (one click) get to the documentation for each of these. It seemed strange that a given…

Hmm, the explanation part does part of what you're asking. However, I don't know of any straight forward documentation that I can link to that will explain each and every one of these tokens. I have just read through pcre.txt many times and implemented stuff from there. If you know a source I can use I will look into it.

Re: Just released a major update for my site. What do you guys think?

#66
post #62

I think your #quickref_links click events need an 'event.preventDefault()' to keep the browser from jumping up to the top of the page when you switch between tabs.

I don't think the problem is the click event sending you to the top of the page, its the fact that the textarea is out of sight and its being modified. The browser will then focus it for you, which scrolls you up. Only way I can think of to solve this would be to make sure the textarea is always visible (even if not for the user), which is more work than its worth I'm afraid.

Re: Just released a major update for my site. What do you guys think?

#68

This is awesome. What I'd want most is in the quiz, I'd love to see how others are coming up with shorter regexes than mine. Satisfy my curiosity and competitive spirit.

Hmm, I don't want users to see shorter answers and then modifying their own to get the same length or even shorter (since they didnt do the real work). What about something like being able to see the shortest answer, but after that you are no longer allowed to modify your pattern? Feel free to pitch in if you have an idea of a neat way to do it.

Re: Just released a major update for my site. What do you guys think?

#69

This is awesome. What I'd want most is in the quiz, I'd love to see how others are coming up with shorter regexes than mine. Satisfy my curiosity and competitive spirit.

Hmm, I don't want users to see shorter answers and then modifying their own to get the same length or even shorter (since they didnt do the real work). What about something like being able to see the shortest answer, but after that you are no longer allowed to modify your pattern? Feel free to pitch in if you have an idea of a neat way to do it.

Well, the way I look at it, I don't see a problem with building on other people's attempts. I'm dying to know how anyone's managed to implement (e.g.) 11-byte email validation, and if I can find an even shorter solution, so much the better to help everyone else learn some regex tricks too!

On the other hand, if you're planning on adding something like a public leaderboard of names, then I guess that would change the nature of the game. Glory, instead of learning or personal challenge. And cheating becomes a problem.

Re: Just released a major update for my site. What do you guys think?

#70

Earlier quoted context omitted.

Hmm, I don't want users to see shorter answers and then modifying their own to get the same length or even shorter (since they didnt do the real work). What about something like being able to see the shortest answer, but after that you are no longer allowed to modify your pattern? Feel free to pitch in if you have an idea of a neat way to do it.

Well, the way I look at it, I don't see a problem with building on other people's attempts. I'm dying to know how anyone's managed to implement (e.g.) 11-byte email validation, and if I can find an even shorter solution, so much the better to help everyone else learn some regex tricks too! On the other hand, if you're planning on adding something like a public leaderboard of names, then I guess that would change the…

You're right.

I managed to mess up some entries of the database, thats why you see some ungodly stuff like 11b email validation. I'll patch it up.

Post reply on HN