diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2010-01-17 08:03:58 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2010-01-17 08:03:58 -0800 |
commit | 409b3d3bb009724473cd6be1ab0b374bf9d01676 (patch) | |
tree | ae1c2bdd1f808a39c9f716a0470a88605587bc9c | |
parent | 50745db41b43160eed7bcfc21f0c7dc42dd58a07 (diff) | |
download | txr-409b3d3bb009724473cd6be1ab0b374bf9d01676.tar.gz txr-409b3d3bb009724473cd6be1ab0b374bf9d01676.tar.bz2 txr-409b3d3bb009724473cd6be1ab0b374bf9d01676.zip |
Clarify that regexes /can/ match across multiple lines with @(freeform).
-rw-r--r-- | txr.1 | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -769,9 +769,11 @@ et cetera. In .B txr, -regular expression matches do not span multiple lines. There is no way -to match a newline character since it's simply not internally represented in -the data. +regular expression matches do not span multiple lines. The regex language has +no feature for multi-line matching. However, the @(freeform) directive +allows the remaining portion of the input to be treated as one big +sequence of, in which line terminators appear as explicit +characters. Regular expressions may freely match through this sequence. It's possible for a regular expression to match an empty string. For instance, if the next input character is z, facing a @@ -801,7 +803,7 @@ Similarly, in the second example, the /a?/ regular expression faces a "z", and thus yields an empty string which is bound to A. Variable @B consumes the entire line. -The third example request the longest match for the variable binding. +The third example requests the longest match for the variable binding. Thus, a search takes place for the rightmost position where the regular expression matches. The regular expression matches anywhere, including the empty string after the last character, which is |