Show HN: RegEx Face Off – Beat your friends with regular expressions
21–30 of 41 posts
Re: Show HN: RegEx Face Off – Beat your friends with regular expressions
#22My 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 s…
Re: Show HN: RegEx Face Off – Beat your friends with regular expressions
#23Apologies if I misunderstood the point of this.
Re: Show HN: RegEx Face Off – Beat your friends with regular expressions
#24Re: Show HN: RegEx Face Off – Beat your friends with regular expressions
#25Sorry, 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 (…
Re: Show HN: RegEx Face Off – Beat your friends with regular expressions
#26My 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 s…
I've actually done that with code-golf in the past. I needed a regex shorter than n that would match what I wanted it to match, so I generated valid regexes up to n length and tested them. A bit brute-force, but eventually saved me one character in the program.
Re: Show HN: RegEx Face Off – Beat your friends with regular expressions
#27Not a bad idea but since there's no penalty for long strings I can win pretty much instantly by treating it as a typing test and typing a short (probably-unique) substring from each match separated by |. It'll get me an instant-win but if for some reason it matches some non-matches I make it a little longer. Here's a screen grab of me winning with this super-strategy. on this run for some reason you'll notice there's a bug at the end but normally it just lets me win with no chance for the other person to score. I'm not sure how you could address this... If you keep it this way it just becomes a typing test...
Re: Show HN: RegEx Face Off – Beat your friends with regular expressions
#28Also, it should be revamped to always run the full time and award points to the shortest regex. I regularly won rounds with entries like `foo|bar|...` Easy to write, and requiring almost no skill.
Re: Show HN: RegEx Face Off – Beat your friends with regular expressions
#29Spoiler warning: super-strategy below. Not a bad idea but since there's no penalty for long strings I can win pretty much instantly by treating it as a typing test and typing a short (probably-unique) substring from each match separated by |. It'll get me an instant-win but if for some reason it matches some non-matches I make it a little longer. Here's a screen grab of me winning with this super-strategy. on this ru…
Re: Show HN: RegEx Face Off – Beat your friends with regular expressions
#30Spoiler warning: super-strategy below. Not a bad idea but since there's no penalty for long strings I can win pretty much instantly by treating it as a typing test and typing a short (probably-unique) substring from each match separated by |. It'll get me an instant-win but if for some reason it matches some non-matches I make it a little longer. Here's a screen grab of me winning with this super-strategy. on this ru…
It's more comfortable / fast make a JS that concatenates the strings (class .match) with pipe separator.