Live data from Hacker News

RegEx Crossword

jimbly.github.io

91–100 of 160 posts

Re: RegEx Crossword

#91
post #59

Earlier quoted context omitted.

.(C|HH)* should match against " " or against "A " or against "B" or against "ZZZZZZZ". But this puzzle doesn't recognize any of those as valid.

That's not the case... .(C|HH)* matches with single character followed by any number of C's or HH's. So " " or "B" would work but in the puzzle the full line has to match so those aren't possible

Even with the full line match, I can't figure this out.

R?(CR)*MC[MA]* is not matching for the full line RMCMMMMMMMMM

Why?

Re: RegEx Crossword

#92
post #59

Earlier quoted context omitted.

That's not the case... .(C|HH)* matches with single character followed by any number of C's or HH's. So " " or "B" would work but in the puzzle the full line has to match so those aren't possible

Even with the full line match, I can't figure this out. R?(CR)*MC[MA]* is not matching for the full line RMCMMMMMMMMM Why?

That line matches for me if I add it to the grid, though it breaks other lines.

Are you sure you're going the right direction? It should be going from the bottom left to the right (in the order of the the regex text).

Re: RegEx Crossword

#93
post #92

Earlier quoted context omitted.

Even with the full line match, I can't figure this out. R?(CR)*MC[MA]* is not matching for the full line RMCMMMMMMMMM Why?

That line matches for me if I add it to the grid, though it breaks other lines. Are you sure you're going the right direction? It should be going from the bottom left to the right (in the order of the the regex text).

Ah, thank you, that was it. I was assuming they started from the label.

Re: RegEx Crossword

#94

Earlier quoted context omitted.

I don't know what any of your three statements actually mean. R*D*M* does not specify anything that has to be found in the string. Nor does any pattern of ()* or []* no matter what you put between the parens or brackets. In all of those cases, any possible string matches the regex starting at the beginning of the string and ending at the end of the string. Your clarification doesn't clarify anything for me.

The regex crossword is working on the basis of matching the entire input string (of " "), not on finding a substring that matches the regex. You can prefer to think of it as having all regexes have an implicit ^ and $, i.e., you're attempting to find a substring that matches "^R D M*$".

Similar to "egrep -x".

Re: RegEx Crossword

#95
post #86

Brilliant. I wonder how it was made? I solved this in about 1.5 hours by starting at the top left, entering any string that satisfied at least one condition, then moving on to the next condition and “fixing up” any previous entries. I was fearful that I might arrive at a nearly correct solution that I would have to massively backtrack from, but it didn’t happen - I only needed a few short backtracks. I think the larg…

Spent a similar amount of time... Ended up with a "solution" that breaks 1 constraint. Must have erred somewhere, but backtracking is only leading to other 1-broken constraint outcomes. Sigh.

Re: RegEx Crossword

#96

Small feature request for this implementation: Highlight/bold the three impacted regex when selecting a given hexagon, trying to trace it manually by eye is a bit of a pain. (I guess I could PR on github when I get some time later today)

https://github.com/Jimbly/regex-crossword/pull/10

Re: RegEx Crossword

#97
post #60

Earlier quoted context omitted.

I assume by 'full match' they mean: - the pattern is found in the input - the start of the match is the start of the input - the end of the match is the end of the input By this definition, 8 spaces does not match the pattern.

I don't know what any of your three statements actually mean. R*D*M* does not specify anything that has to be found in the string. Nor does any pattern of ()* or []* no matter what you put between the parens or brackets. In all of those cases, any possible string matches the regex starting at the beginning of the string and ending at the end of the string. Your clarification doesn't clarify anything for me.

[deleted]

Re: RegEx Crossword

#98
post #16

Is it supposed to have an unique solution or are multiple solutions possible?

The solution: https://www.i-programmer.info/images/stories/News/2014/Dec/B... Aren't crosswords supposed to spell out a word? This feels like random characters. Unless i'm supposed to rotate it or something?

Think sudoku rather than crossword.

Re: RegEx Crossword

#99
post #92

Earlier quoted context omitted.

That line matches for me if I add it to the grid, though it breaks other lines. Are you sure you're going the right direction? It should be going from the bottom left to the right (in the order of the the regex text).

Ah, thank you, that was it. I was assuming they started from the label.

Yeah it took some testing to figure out the direction.

Re: RegEx Crossword

#100
post #86

Brilliant. I wonder how it was made? I solved this in about 1.5 hours by starting at the top left, entering any string that satisfied at least one condition, then moving on to the next condition and “fixing up” any previous entries. I was fearful that I might arrive at a nearly correct solution that I would have to massively backtrack from, but it didn’t happen - I only needed a few short backtracks. I think the larg…

Spent a similar amount of time... Ended up with a "solution" that breaks 1 constraint. Must have erred somewhere, but backtracking is only leading to other 1-broken constraint outcomes. Sigh.

Official solution from the original author: https://web.mit.edu/puzzle/www/2013/coinheist.com/rubik/a_re...
Post reply on HN