| From | Sent On | Attachments |
|---|---|---|
| Christopher Rued | Oct 2, 2000 11:00 am | |
| Mark Ovens | Oct 2, 2000 11:15 am | |
| Mark Ovens | Oct 2, 2000 11:25 am | |
| Andresen,Jason R. | Oct 2, 2000 11:36 am | |
| Christopher Rued | Oct 2, 2000 2:09 pm | |
| Mark Ovens | Oct 2, 2000 3:34 pm | |
| Dirk Myers | Oct 2, 2000 7:21 pm |
| Subject: | Re: Perl question | |
|---|---|---|
| From: | Andresen,Jason R. (jand...@mitre.org) | |
| Date: | Oct 2, 2000 11:36:51 am | |
| List: | org.freebsd.freebsd-questions | |
Mark Ovens wrote:
On Mon, Oct 02, 2000 at 07:15:37PM +0100, Mark Ovens wrote:
/a.?c.*d/;
Doh, typo! That should read
/a.*?c.*d/;
BTW, your RE should have a ``*'' as well:
/x.*?y/
Maybe, it depends on exactly what he was trying to get.
The first 3 character match where x and y are the first and third character respectivly, then x.y is exactly what you want. The smallest set of characters that have x and y as boundry values? Then your x.*?y is correct. The smallest set of characters that have x and y as boundries and have at least one character in between them? x.+?y is needed.
I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" -- Larry Wall in <1998...@wall.org>
-- _ _ _ ___ ____ ___ ______________________________________ / \/ \ | ||_ _|| _ \|___| | Jason Andresen -- jand...@mitre.org / /\/\ \ | | | | | |/ /|_|_ | Views expressed may not reflect those /_/ \_\|_| |_| |_|\_\|___| | of the Mitre Corporation.
To Unsubscribe: send mail to majo...@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message





