4 ms·
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
by nxrabl 6y ago
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.
- freeopinion 6y agoI 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 6y ago[deleted]
- deleted 6y ago[deleted]
- jcranmer 6y agoThe 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*$".
- dec0dedab0de 6y agoYou 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/crossword.js#L118 https://github.com/Jimbly/regex-crossword/blob/master/crossw...
- ladberg 6y agoNot anymore, hah: https://github.com/Jimbly/regex-crossword/commit/0e603975f21116718c6ed58328ae6d1ac7249628 https://github.com/Jimbly/regex-crossword/commit/0e603975f21...
- dec0dedab0de 6y agoHaha! Fantastic commit message
- Jimbly 6y agoGlad someone appreciated it :D
- schoen 6y agoSimilar to "egrep -x".
- deleted 6y ago[deleted]