Regular expressions: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
Finished Character classes, started assertions |
No edit summary |
||
Line 75: | Line 75: | ||
! colspan=4 | Assertions |
! colspan=4 | Assertions |
||
|- |
|- |
||
| <code>^</code> || Input boundary beginning assertion || Matches the beginning of the input. If the <code>m</code> flag is on, it matches the start of each line. || rowspan="2" | "Foo Bar" <code>/^Foo |
| <code>^</code> || Input boundary beginning assertion || Matches the beginning of the input. If the <code>m</code> flag is on, it matches the start of each line. || rowspan="2" | "Foo Bar" <code>/(^Foo)|(Bar$)/g</code> -> <code>[ "Foo", "Bar" ]</code> |
||
|- |
|- |
||
| <code>$</code> || Input boundary end assertion || Matches the end of the input. If the <code>m</code> flag is on, it matches the end of each line. |
| <code>$</code> || Input boundary end assertion || Matches the end of the input. If the <code>m</code> flag is on, it matches the end of each line. |