Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Aug 2003 08:01:05 +0900 (JST)
From:      Roger Williams <root@bara.naviservers.net>
To:        <questions@freebsd.org>
Subject:   Off Topic Regex Question
Message-ID:  <20030828075925.P26740-100000@bara.naviservers.net>

next in thread | raw e-mail | index | archive | help
I know thins is not the place but I know one of you know this one off the
top of your head.

I have:

$list = "dog 1 1 1 cat 2 1 snake 111"
and I want to end up with:
dog 1 cat 2 snake 1
I thought
$list =~ s/ \d \d/ \d/g;
would do the trick, but that gives me:
dog d 1 1 cat d snake d 1

Thanks,
Roger



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030828075925.P26740-100000>