the only difference is the 'x' after '/g'
- From: kloro@xxxxxxx (Tom Arnall)
- Date: Thu, 30 Mar 2006 02:36:14 -0800
the following code:
my (@main);
$_="
From a
From: b
From: c
From: d
";
@main = /From [^\n]*?\n.*?(From: .*?\n).*?/gx;
print "@main";
print "------------------------------\n";
@main = /From [^\n]*?\n.*?(From: .*?\n).*?/g;
print "@main";
produces:
From: b
From: d
------------------------------
From: b
the only difference between the two regex lines is the 'x' after '/g' in the
first of the two regex lines.
thanks,
tom arnall
north spit, ca
.
- Follow-Ups:
- Re: the only difference is the 'x' after '/g'
- From: DJ Stunks
- Re: the only difference is the 'x' after '/g'
- From: Hans Meier
- Re: the only difference is the 'x' after '/g'
- Prev by Date: RE: store Array in hash ?
- Next by Date: Re: the only difference is the 'x' after '/g'
- Previous by thread: store Array in hash ?
- Next by thread: Re: the only difference is the 'x' after '/g'
- Index(es):