Added checkIfRegexOnPage method