Brian Barker wrote:
At 19:51 21/08/2009 +0200, Jonathan Kaye wrote:
Here is my second question, Pradeep, since you know regular
expressions quite well.
Sorry, I'm not Pradeep; will I do?
I want to match a string from the start of the record to the first
full-stop (if any) in the record. That part is easy: ^.*\. gives me
what I want.
Actually, it's not quite as easy as that. Regular expressions match
as much as possible: they are sometime described as "greedy". So your
expression matches everything up to the *last* full stop in a
paragraph, in fact. You need something like
^[^\.]*\.
instead. The part enclosed in square brackets matches anything that
is not a full stop.
In a "proper" Regular Expression engine you can follow the "*" with a
"?" to specify "non-greedy". Perhaps an RFE?
<snip>
--
Harold Fuchs
London, England
Please reply *only* to [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]