Live data from Hacker News

Show HN: RegEx Face Off – Beat your friends with regular expressions

regexfaceoff.com

11–20 of 41 posts

Re: Show HN: RegEx Face Off – Beat your friends with regular expressions

#12
This is a little side project I made to learn about Web sockets. Each question consists of a "match" pattern and a "skip" pattern, and then looks up words on wordsapi.com to match those patterns when the question is generated.

It was hard thinking up patterns, so if you have ideas, please let me know.

Re: Show HN: RegEx Face Off – Beat your friends with regular expressions

#13

Sorry, this will be a negative review. This is easily the most frustrating game I've ever played. I can't test parenthesis because it tells me my time 'ran out' with 45 seconds on the clock. I could barely type 4 or 5 characters. Edit: There are also XSS issues with the player name, you can execute Javascript in the other player's window. That's not good. I confirmed this since an image I scripted to load via HTML (…

The Rickroll should be fixed.

Re: Show HN: RegEx Face Off – Beat your friends with regular expressions

#14

Sorry, this will be a negative review. This is easily the most frustrating game I've ever played. I can't test parenthesis because it tells me my time 'ran out' with 45 seconds on the clock. I could barely type 4 or 5 characters. Edit: There are also XSS issues with the player name, you can execute Javascript in the other player's window. That's not good. I confirmed this since an image I scripted to load via HTML (…

The Rickroll should be fixed.

Nice, thanks for being responsive! I agree it's a great concept, sorry if the critique came across as harsh.

Re: Show HN: RegEx Face Off – Beat your friends with regular expressions

#15

Earlier quoted context omitted.

The Rickroll should be fixed.

Nice, thanks for being responsive! I agree it's a great concept, sorry if the critique came across as harsh.

Np, glad someone's playing it. I was loling when I started a game and rickroll started playing.

Re: Show HN: RegEx Face Off – Beat your friends with regular expressions

#17

Sorry, this will be a negative review. This is easily the most frustrating game I've ever played. I can't test parenthesis because it tells me my time 'ran out' with 45 seconds on the clock. I could barely type 4 or 5 characters. Edit: There are also XSS issues with the player name, you can execute Javascript in the other player's window. That's not good. I confirmed this since an image I scripted to load via HTML (…

The Rickroll should be fixed.

Still there actually, but in a different place. There's another XSS, if you just paste this in your solution:

  |

Re: Show HN: RegEx Face Off – Beat your friends with regular expressions

#18
post #4

My strategy of "capture the last two characters of each input in the accept group followed by $" hasn't failed yet, and is quick to input and requires no thought. Though I wouldn't say I'm practicing any practical RegEx skills doing so. :P

My strategy was ^[].*[^]$ where you first fill in all the first letters of the match words and then all the last characters of the skip group. Works fairly well.

I'm not sure if there is a length limit, but I'm fairly sure I could come up with a vim macro/regex that would allow me to copy the match words and make a (list|like|so) within 45 seconds.

Give the time limit, it would be more fun to automatically let your strategy compete. (maybe with a weight of length vs correctness) Write a function that, given two arrays of words, return the best regex.

Re: Show HN: RegEx Face Off – Beat your friends with regular expressions

#19

Earlier quoted context omitted.

The Rickroll should be fixed.

Still there actually, but in a different place. There's another XSS, if you just paste this in your solution: |

Ok, now THAT rick roll should be fixed

Re: Show HN: RegEx Face Off – Beat your friends with regular expressions

#20

This is a little side project I made to learn about Web sockets. Each question consists of a "match" pattern and a "skip" pattern, and then looks up words on wordsapi.com to match those patterns when the question is generated. It was hard thinking up patterns, so if you have ideas, please let me know.

i think you should start off with patterns that have less characters (3-5 max), but mix digits and symbols in - at least, in the early game. I found the patterns to be too complex to quickly come up with a regex.

Alternatively, use a very limited alphabet (like 'a', 'b', 'c'), and have longer patterns like 'aabbaaabbbc'.

Post reply on HN