Live data from Hacker News

RegEx Crossword

jimbly.github.io

151–160 of 160 posts

Re: RegEx Crossword

#151
That was a lot of fun. It can help solving this puzzle if you are familiar with techniques for solving picross (AKA nonogram) puzzles.

Re: RegEx Crossword

#152
post #151

That was a lot of fun. It can help solving this puzzle if you are familiar with techniques for solving picross (AKA nonogram) puzzles.

Thanks! I did some nonograms years ago, and I saw the similarity but couldn't remember the name of that type of puzzle.

I think I saw at least 3 places where that technique could be used, probably more.

Re: RegEx Crossword

#153
post #116

Earlier quoted context omitted.

Merged, thanks!

Unfortunately they mixed up the coordinates a little. I submitted a fix.

Your fix is appreciated. It's much nicer not to have to ignore the label highlighting across the top when clicking in rows below the middle.

Re: RegEx Crossword

#154
post #38

Earlier quoted context omitted.

That's because it's not empty string in the puzzle, it's 8 spaces. (and on top of that, we're doing a full match.)

8 spaces also matches. I don't know what you mean by a full match. Do you mean that you are using a different RegEx than the one displayed?

The issue is two different types of regex notation.

Some regex notations include "^" and "$", and some don't. A lot of software (the grep command, for example) uses the kind that does support "^" and "$". This puzzle uses the other kind.

Essentially, when a notation includes "^" and "$", it allows writing cleaner more concise patterns. These notations add an implicit "." at the beginning and end of every pattern unless you use "^" or "$" to turn that off.

As for how you're supposed to know this, the puzzle tell you, but there is a very strong clue, which is that many of the patterns have a leading/trailing ".". This would be totally superfluous in one type of notation, so it must be the other kind.

Here are some patterns from the puzzle's notation:

    .*H.*H.*
    (DI|NS|TH|OM)*
    F.*[AO].*[AO].*
and here are how they'd look in a notation that uses "^" and "$":

    H.*H
    ^(DI|NS|TH|OM)*$
    ^F.*[AO].*[AO]

Re: RegEx Crossword

#155

Earlier quoted context omitted.

8 spaces also matches. I don't know what you mean by a full match. Do you mean that you are using a different RegEx than the one displayed?

The issue is two different types of regex notation. Some regex notations include "^" and "$", and some don't. A lot of software (the grep command, for example) uses the kind that does support "^" and "$". This puzzle uses the other kind. Essentially, when a notation includes "^" and "$", it allows writing cleaner more concise patterns. These notations add an implicit ". " at the beginning and end of every pattern unl…

To be fair, the puzzle didn't tell them at the time of their post, I added the "must be a full match" line after seeing confusion here, and it was not in the original puzzle (people doing puzzle hunts are expected to deduce more than random people on the internet, I guess!).

Re: RegEx Crossword

#156

Earlier quoted context omitted.

Yes, those are three ways of saying the same thing. :)

Not really. Maybe I'm being overly pedantic, but my point was that the first two ways of describing it are overly specific and don't include all the strings that can be matched. Only the third option really describes all the possibilities.

What is an example of a string that can be matched which does not meet the first or second description?

Re: RegEx Crossword

#157

Earlier quoted context omitted.

Not really. Maybe I'm being overly pedantic, but my point was that the first two ways of describing it are overly specific and don't include all the strings that can be matched. Only the third option really describes all the possibilities.

What is an example of a string that can be matched which does not meet the first or second description?

Sorry, you're right. I'm not sure what I was thinking.

Re: RegEx Crossword

#158
post #148

Earlier quoted context omitted.

This is how I interpret it, too. What am I missing?

Because of the ".*" on either end, it's just having a sequence of 8 somewhere that are mirrored, could be the first 8 or last 8, not strictly the middle 8.

Yeah, sorry for the bad formatting. I probably should've taken the time to make it not markdownify the asterisks. Without them, it is mirroring the middle eight.

Re: RegEx Crossword

#159
post #148

Earlier quoted context omitted.

This is how I interpret it, too. What am I missing?

Because of the ".*" on either end, it's just having a sequence of 8 somewhere that are mirrored, could be the first 8 or last 8, not strictly the middle 8.

I misread the parent post and I was interpreting the clue correctly after all. Thanks for helping clarify. It was a fun puzzle.
Post reply on HN