RegEx Crossword
151–160 of 160 posts
Re: RegEx Crossword
#152That was a lot of fun. It can help solving this puzzle if you are familiar with techniques for solving picross (AKA nonogram) puzzles.
I think I saw at least 3 places where that technique could be used, probably more.
Re: RegEx Crossword
#153Re: RegEx Crossword
#154Earlier 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?
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
#155Earlier 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…
Re: RegEx Crossword
#156Earlier 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.
Re: RegEx Crossword
#157Earlier 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?
Re: RegEx Crossword
#158Earlier 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.
Re: RegEx Crossword
#159Earlier 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.
Re: RegEx Crossword
#160Regex Golf used to be my game https://alf.nu/RegexGolf