$text = 'asdasd'; $count = () = $text =~ /asd/g; [download]
In reply to Re: Counting Substrings in Strings by audreyt in thread Counting Substrings in Strings by CmdrTaco