On 09/12/2008 21:53, Jerry Clancy wrote:
"Harold Fuchs" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
No, it doesn't imply that. It says that when you use a Regular
Expression
(RE) you can't specify a pattern that spans a paragraph boundary. So,
for
example, if I want to search for ABCD there is no way to specify that
I want
to include instances where, e.g. the AB occurs at the end of one
paragraph
and the CD occurs at the beginning of the next.
I was missing the RE context. Your explanation makes sense.
Out of curiosity, would it find AB$CD?
No. To do that the pattern you'd need is "AB\$CD". The "\" says that the
*next* character is not to be treated specially - in the jargon the next
character is "escaped".
In REs, the "$" special character does mean "paragraph mark". It
means that
the preceding pattern must only be considered "found" if it occurs at
the
end of a paragraph
My [rather crucial, sorry] typo in the above: I typed 'the "$" special
character does mean "paragraph mark" '. I meant 'the "$" special
character does **not** mean "paragraph mark" '.
Thanks to John Linge's post just prior to yours I sorted all that out
and took a look at the regular expressions for the first time. Very
useful. A lot like the stuff we had to do with DOS editors.
For a real exposition on REs take a look at the relevant section of the
documentation on a programming language named Perl invented by a lunatic
genius named Larry Wall. Perl's specification and implementation of REs
really are the bees' knees.
--
Harold Fuchs
London, England
Please reply *only* to [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]