I have to test classnames of different nodes in event delegation method I am using :
the test case I am using is
function clickHandler(e){
var evt = e || window.event;
target = evt.target || evt.srcElement,
cls = target.className,id = target.id;
if(/\bcell\b/i.test(cls)){
//perform some action is node having classname cell is clicked
}
}
but this particular test is match for nodes with classname .cell as well as .cell-validation-text.
The above test return true for both these nodes. How can i modify my regExp so as my above test returns true only for node having class .cell and false for .cell-validation text