Hi guys,

I have this that loops through an array and checks if the elements className matches one of the array values.

for (var t=0; t<pArrCol.length; t++) {
if (pObj[i].className.match(pArrCol[t])) {

it works but I need an exact match not just part of the string.

For example:

When I run that code and lets say my array contains:
var arrCol = ['s25','s121'];
and the className is "s121".

Well the problem is it matches both values.

I need it to check whether it matches the whole string value not just part of it.

I'm not very good with RegExp but I'm pretty sure that's what the solution is.

Help would be awesome!

Thanks!