#!/usr/bin/perl $_ = "abcd bcde cdef defg"; # @x is a array with as much 'cde' scalars as in $_ @x = /cde/g; print "@x\n"; # count how often cde is in $_ $anz = () = /cde/g; print "$anz\n"
In reply to Re: Matching multiple occurences in one string
by borisz
in thread Matching multiple occurences in one string
by pepijn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |