RE: sort regex trouble!

2002-04-24 Thread David Gray
> >May I suggest: > >(my $A = $a) =~ s/^(\d+)<\/td>/$1/; > >(my $B = $b) =~ s/^(\d+)<\/td>/$1/; > > That's not what he's doing. He's doing: > > my ($A) = $a =~ m{^(\d+)}; > my ($B) = $b =~ m{^(\d+)}; > > Yours leaves everything after the tacked onto the end > of $A; mine and his only sto

RE: sort regex trouble!

2002-04-24 Thread Jeff 'japhy' Pinyan
On Apr 24, David Gray said: >> > sub by_number_of_citations >> > { >> >$a =~ /\(.*?)\<\/td\>/; >> >my $A = $1; >> >$b =~ /\(.*?)\<\/td\>/; >> >my $B = $1; >> > >> >$B <=> $A; >> > } > >May I suggest: >(my $A = $a) =~ s/^(\d+)<\/td>/$1/; >(my $B = $b) =~ s/^(\d+)<\/td>/$1/; Th

RE: sort regex trouble!

2002-04-24 Thread David Gray
> > im trying to sort out this sort routine: > > the sub by_number_of_citations works > > but if i try to make a sort alphabetically, my regex fails? > > how should it be done? > > > > # sting to match: 1212Cited > > Work121232< /td>1999 > > > > # sort routine > > # > > sub by_number_of_citations

Re: sort regex trouble!

2002-04-23 Thread bob ackerman
On Monday, April 22, 2002, at 06:01 AM, [EMAIL PROTECTED] wrote: > hi > > im trying to sort out this sort routine: > > the sub by_number_of_citations works > > but if i try to make a sort alphabetically, my regex fails? > > how should it be done? > > > martin > > > > # sting to match: 1212Cited