Re: [Perl-unix-users] Regular Expression Question

2006-03-03 Thread Anthony Ettinger
On 3/2/06, Jason Vincent <[EMAIL PROTECTED]> wrote: > > > > If I have a pattern that appears mulitple times (but I don't know how many > times) in a string, how do I get at the matched text for each of the > matches? > > Made up example… > > $string = > 'ab23cdefgXX(3A5)XXhijkl23mnXX(3)XXopq432rsXX

[Perl-unix-users] Regular Expression Question

2006-03-03 Thread Jason Vincent
Title: Regular Expression Question If I have a pattern that appears mulitple times (but I don't know how many times) in a string, how do I get at the matched text for each of the matches? Made up example… $string = 'ab23cdefgXX(3A5)XXhijkl23mnXX(3)XXopq432rsXX(450b)XXtuv'; If ($string =

RE: [Perl-unix-users] validating (restricting) hash values and ke ys

2006-03-03 Thread Peter Eisengrein
> > #!/usr/bin/perl -w > use strict; > use warnings; > > my %hash = ( "acc12", 1, > "acc2", 0, > "acc3", '', > "una1", 1 ); > > $hash{acc3} = (); > > my $valid="acc1|acc2|acc3"; > I'd get rid of the pattern matching and put the valid keys in their ow