Adding missing 'pattern:'
Adding missing 'pattern:' next to 'm' in the line "Without the flag `m`"
This commit is contained in:
parent
24224dc2ec
commit
e20b1a4843
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ Eeyore: 3`;
|
||||||
alert( str.match(/\d$/gm) ); // 1,2,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
|
```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`.
|
"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`.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue