Re: matching multiple occurrences in the same line



michal.shmueli@xxxxxxxxx <michal.shmueli@xxxxxxxxx> wrote:

> so anyway i tried
> the follow as you suggested:
> while(<FILE>){
> while(~ gm/<td class="year" rowspan="2">(\d+)./) {print OUT "\t$1";}
^
^

That is the bitwise negation operator.

Why are you using that there?

What is the point of the final dot in your pattern?


> now i get some compliation errors.


Well yes, because that is not the change that was suggested.

It was suggested to add a "g" option to the pattern match operator.

See perlop.pod for how to add pattern match options.


--
Tad McClellan SGML consulting
tadmc@xxxxxxxxxxxxxx Perl programming
Fort Worth, Texas
.