The 4th edition of the Camel states:
*
0123456789 =~ /(\d{3})/g
returns only three strings: 012, 345, and 678. By wrapping the capture
group with a lookahead assertion:
0123456789 =~ /(?:(\d{3}))/g
you now retrieve all of 012, 123, 234, 345, 456, 567, 678, and
On Wed, Jun 19, 2013 at 02:36:14PM +0100, gvim wrote:
The 4th edition of the Camel states:
*
0123456789 =~ /(\d{3})/g
returns only three strings: 012, 345, and 678. By wrapping the capture
group with a lookahead assertion:
0123456789 =~ /(?:(\d{3}))/g
you
I'd say typo in the book. A look-ahead assertion looks like C (?=
) (note C= instead of C:). C (?: ) is just a
non-capturing group.
$ perl -E 'say for 0123456789 =~ /(?=(\d{3}))/g'
012
123
234
345
456
567
678
789
--
Dakkar - Mobilis in mobile
GPG public key
On 19/06/13 14:52, Abigail wrote:
That's not a lookahead assertion. This is:
$ perl -wE 'say for 0123456789 =~ /(?=(\d{3}))/g'
012
123
234
345
456
567
678
789
$
So there's a typo on p.248
gvim
Quoting gvim gvi...@gmail.com:
On 19/06/13 14:52, Abigail wrote:
That's not a lookahead assertion. This is:
$ perl -wE 'say for 0123456789 =~ /(?=(\d{3}))/g'
012
123
234
345
456
567
678
789
$
So there's a typo on p.248
Patches welcome -
On Wed, Jun 19, 2013 at 03:02:32PM +0100, gvim wrote:
On 19/06/13 14:52, Abigail wrote:
That's not a lookahead assertion.
So there's a typo on p.248
Yes, and it's listed in the errata on the publisher's Web site:
http://oreilly.com/catalog/errata.csp?isbn=9780596004927
Tom
so, forgetting the typo for a moment, why doesn't it output
012
012
012
012
...
?
From my reading of the 5.12 perlre docs, there is no mention of moving the
cursor along by one position after each match.
Maybe that is a more general thing I wasn't aware of.
On Wed, Jun 19, 2013 at 3:02 PM,
I was thinking you'd have to use something like this
perl -wE 'say for 0123456789 =~ /(\d(?=(\d{2})))/g'
0
12
1
23
2
34
3
45
4
56
5
67
6
78
7
89
obviously with some post-processing required.
On Wed, Jun 19, 2013 at 3:28 PM, Bob MacCallum uncool...@gmail.com wrote:
so, forgetting the typo
On 2013-06-19 Bob MacCallum uncool...@gmail.com wrote:
so, forgetting the typo for a moment, why doesn't it output
012
012
012
012
...
?
From my reading of the 5.12 perlre docs, there is no mention of
moving the cursor along by one position after each match. Maybe
that is a more
Bob MacCallum uncool...@gmail.com wrote:
From my reading of the 5.12 perlre docs, there is no mention of moving the
cursor along by one position after each match.
Maybe that is a more general thing I wasn't aware of.
Yes, though only when the match was zero-length. This is done on the
grounds
On Wed, Jun 19, 2013 at 7:28 AM, Bob MacCallum uncool...@gmail.com wrote:
so, forgetting the typo for a moment, why doesn't it output
012
012
012
012
...
?
From my reading of the 5.12 perlre docs, there is no mention of moving the
cursor along by one position after each match.
Maybe
thanks everyone for pointing out what I hadn't seen in the docs.
On Wed, Jun 19, 2013 at 4:00 PM, Yitzchak Scott-Thoennes sthoe...@gmail.com
wrote:
On Wed, Jun 19, 2013 at 7:28 AM, Bob MacCallum uncool...@gmail.com
wrote:
so, forgetting the typo for a moment, why doesn't it output
012
It appears that my esteemed government has changed the rules about about
which pets one might keep at home. Apart from all the usual suspects, it
appears one may keep a water buffalo but, crucially, one will *not* be
able to keep a camel. Apparently, camels are dirty, disease ridden
animals
On Jun 19, 2013, at 9:15 PM, Dirk Koopman d...@tobit.co.uk wrote:
It appears that my esteemed government has changed the rules about about
which pets one might keep at home. Apart from all the usual suspects, it
appears one may keep a water buffalo but, crucially, one will *not* be able
to
Wow, and I thought Oakland (California) was permissive allowing us, in
a large (~1M pop.) city, to keep cows and horses. You need an acre
minimum for a horse, but so long as you can demonstrate adequate
manure processing capacity, cows are a go.
Where is this fabulous discussion happening? Is
On Jun 19, 2013, at 9:55 PM, Paul Makepeace pa...@paulm.com wrote:
On Wed, Jun 19, 2013 at 12:15 PM, Dirk Koopman d...@tobit.co.uk wrote:
It appears that my esteemed government has changed the rules about about
which pets one might keep at home. Apart from all the usual suspects, it
appears
* Paul Makepeace (pa...@paulm.com) [130619 20:04]:
Wow, and I thought Oakland (California) was permissive allowing us, in
a large (~1M pop.) city, to keep cows and horses. You need an acre
minimum for a horse, but so long as you can demonstrate adequate
manure processing capacity, cows are a
On 19/06/13 20:55, Paul Makepeace wrote:
Wow, and I thought Oakland (California) was permissive allowing us, in
a large (~1M pop.) city, to keep cows and horses. You need an acre
minimum for a horse, but so long as you can demonstrate adequate
manure processing capacity, cows are a go.
Where is
Apparently the Easter Quoll (http://en.wikipedia.org/wiki/Eastern_quoll) is a
good replacement for a cat. However the australian regulatory environment
makes this very difficult to do.
On 20/06/2013, at 5:55 AM, Paul Makepeace pa...@paulm.com wrote:
Wow, and I thought Oakland (California)
Excellent! Sensible policies for a happier Britain!
On Wed, 2013-06-19 at 20:15 +0100, Dirk Koopman wrote:
It appears that my esteemed government has changed the rules about about
which pets one might keep at home. Apart from all the usual suspects, it
appears one may keep a water buffalo
On 19 Jun 2013, at 21:23, Mark Overmeer m...@overmeer.net wrote:
The first has the usual suspects like bears, skunk, dingo,
various foxes, racoon, but also the Elk(!) and wallabies (deceases).
That's a shame, since the Russians spent 50 years breeding tame foxes:
Apparently the Easter Quoll is a good replacement for a cat.
Except that it's a species of Australian wildlife. And nocturnal.
Which means that it will wait until you fall asleep before it kills you.
Damian
At 09:55 PM 6/19/2013, Paul Makepeace wrote:
Wow, and I thought Oakland (California) was permissive allowing us, in
a large (~1M pop.) city, to keep cows and horses. You need an acre
minimum for a horse, but so long as you can demonstrate adequate
manure processing capacity, cows are a go.
Where
On Wed, Jun 19, 2013 at 1:25 PM, Dirk Koopman d...@tobit.co.uk wrote:
An URL in English:
http://www.dutchnews.nl/news/archives/2013/06/new_official_rules_you_can_kee.php
The approved list contains animals such as dogs, cats, hamsters, mink
and water buffalo.
I'm sorry but one of these animals
On Thu, Jun 20, 2013 at 07:14:42AM +1000, Damian Conway wrote:
Except that it's a species of Australian wildlife.
Are you sure? It's not venomous.
The discussion is in the Dutch Parliament and it's committees. Maybe a bit
far out of reach for you :-)
Not really: I do live in New Holland, after all.
(https://en.wikipedia.org/wiki/New_Holland_%28Australia%29)
;-)
Damian
On 19 Jun 2013, at 22:14, Damian Conway dam...@conway.org wrote:
Except that it's a species of Australian wildlife. And nocturnal.
Which means that it will wait until you fall asleep before it kills you.
Skippy, skippy, skippy the bush kangaroo-oo
James
27 matches
Mail list logo