Jim Canon wrote:
> 
> Thank you very much for the response, it has helped me begin to understand
> how regular expressions work.  I see that /(\d+)$/ matches the numbers
> until the end of line in
> 
> @job1 = qw(
>  job555
>  job572
>  job8433
>  job873
>  job594
>  job4663
>  job2221
>  job2223
> );
> 
> @job2 = qw(
>  job555
>  job8433
>  job873
>  job594
>  job4663
>  job2221
>  job2223
> );
> 
> If I wanted to match the same as above, but there are other numbers infront
> of what I need to match, such as below:
> 
> @job1 = qw(
> word1 word2 job2006 three four five six community job555
> word1 word2 job2006 three four five six community job8433
> word1 word2 job2006 three four five six community job873
> word1 word2 job2006 three four five six community job594
> word1 word2 job2006 three four five six community job4663
> word1 word2 job2006 three four five six community job2221
> word1 word2 job2006 three four five six community job2223
> );
> 
> @job2 = qw(
> word1 word2 job2006 three four five six seven job555
> word1 word2 job2006 three four five six seven job8433
> word1 word2 job2006 three four five six seven job873
> word1 word2 job2006 three four five six seven job594
> word1 word2 job2006 three four five six seven job4663
> word1 word2 job2006 three four five six seven job2221
> word1 word2 job2006 three four five six seven job2223
> );
> 
> What would be the best expression you would use to match the same
> jobnumbers as previously?  I tried all of the expressions that made
> sense to me but did not have luck

I do not understand your question.  In your example arrays above none of the
elements have "numbers infront" of them?



John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to