From 409b3d3bb009724473cd6be1ab0b374bf9d01676 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 17 Jan 2010 08:03:58 -0800 Subject: Clarify that regexes /can/ match across multiple lines with @(freeform). --- txr.1 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/txr.1 b/txr.1 index ecdb06db..8bc39187 100644 --- a/txr.1 +++ b/txr.1 @@ -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 -- cgit v1.2.3