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.
RegEx Crossword
71–80 of 160 posts
Re: RegEx Crossword
#72NY Times Mon < Tue < Wed < Thu < Fri < Sat < Sun < British Cryptic < RegEx
Re: RegEx Crossword
#73Earlier quoted context omitted.
I just completed it, and can say with certainty that it is solvable by only taking into consideration two constraints at any given time, with the exception of 3 at just one point early on (and they were the easier constraints in the puzzle). That being said, the nature of regex means you kind of need to jump around as far as which constraints you combine.
Is the complexity basically NP-hard, equivalent to a SAT solver or even harder?
Re: RegEx Crossword
#74It took me just under 2.5 hours. How are you folks faring? Tip: Ctrl-Z is your friend ;)
Re: RegEx Crossword
#75Re: RegEx Crossword
#76Earlier 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.
Re: RegEx Crossword
#77Earlier 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
Can you explain what you are seeing about "B" that does not match? Or about "_______"?
Assuming an empty 7-cell row, the regex in question will match 7 times, once for each character. A result of multiple partial matches is not equivalent to getting just one perfect match, which is what the puzzle requires. Internally, the puzzle enforces this requirement by making each Regex rule require a full line match (see line 118: '^' + rule + '$').
Personally speaking, I felt like that was the most intuitive way to interpret the mechanics of the game, so I'm willing to give the programmer a pass when they slightly modify the regex rule prior to evaluation.
[1]:https://github.com/Jimbly/regex-crossword/blob/8b178f32eba37... [2]:https://i.imgur.com/PS0BmJ6.png
Re: RegEx Crossword
#78Earlier quoted context omitted.
I don't doubt that, and I don't doubt it's a good puzzle, especially if you're already familiar with the format. But since this is my first introduction to this kind of puzzle, I need some anchor points at the beginning so I feel like I have something to work off of. I'm not even asking for a whole row, just an easier set of known chars at the start of the round so I have a hint at which of the 39 constraints I shoul…
I did complete and enjoy it, but I'm both very competent with regex like you, but also big into sudoku variants (as in the youtube channel cracking the cryptic! [1]) so this felt like it was designed for me to enjoy. Considering it took me about half an hour, I'd expect someone who isn't into these kinds of odd puzzles already to basically have exactly your reaction. [1] https://www.youtube.com/c/CrackingTheCryptic
Re: RegEx Crossword
#79Earlier 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*$".
That is literally what is happening: https://github.com/Jimbly/regex-crossword/blob/master/crossw...
Re: RegEx Crossword
#80Earlier 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.)
R*D*M* should match empty string or a string of 8 spaces. or any combination of characters. It should be impossible not to match. Edit: Fix HN oddity
% python3
>>> import re
>>> re.search(r'R*D*M*', ' ')
>>> re.fullmatch(r'R*D*M*', ' ')
>>>