Re:RegEx Crossword
by freeopinion on Friday March 12, 2021 @05:09PM
(#26441579)
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 "^RDM*$".
Re:RegEx Crossword
by dec0dedab0de on Friday March 12, 2021 @05:54PM
(#26441958)
You can prefer to think of it as having all regexes have an implicit ^ and $
That is literally what is happening: https://github.com/Jimbly/regex-crossword/blob/master/crossw...
Not anymore, hah: https://github.com/Jimbly/regex-crossword/commit/0e603975f21...
Re:RegEx Crossword
by dec0dedab0de on Saturday March 13, 2021 @10:36AM
(#26447232)
Haha! Fantastic commit message
Glad someone appreciated it :D
- 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.