Hey, Please can you help me work out a code for this question.

Name of function and its parameter
idxP1(contents,pattern)

Description
returns the index of the first page in contents that matches pattern (case insensitive)
returns -1 if no matching page found


Examples
idxP1(contents,"uni") returns 0 (assuming that contents is initialised as shown above)
idxP1(contents,"not") returns 2

Thanks!