Merge pull request #1895 from Aakodal/patch-2

Adding missing 'pattern:'
This commit is contained in:
Alexey Pyltsyn 2020-05-09 23:00:34 +03:00 committed by GitHub
commit 4927d7a792
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,7 +54,7 @@ Eeyore: 3`;
alert( str.match(/\d$/gm) ); // 1,2,3
```
Without the flag `m`, the dollar `pattern:$` would only match the end of the whole text, so only the very last digit would be found.
Without the flag `pattern:m`, the dollar `pattern:$` would only match the end of the whole text, so only the very last digit would be found.
```smart
"End of a line" formally means "immediately before a line break": the test `pattern:$` in multiline mode matches at all positions succeeded by a newline character `\n`.