Find search word within a string

Hi @ all

I would like to search in a string a user-defined word and I want to
find out, how many times its appear in the string. Can anyone help me?

thanks for your effort...

···

--
Posted via http://www.ruby-forum.com/.

String#scan

Please read the documentation for details.

Blessings,
TwP

···

On 7/31/07, M. R. <ribi@schwingerverband.ch> wrote:

Hi @ all

I would like to search in a string a user-defined word and I want to
find out, how many times its appear in the string. Can anyone help me?