Extracted: create Regexp from match_with and use =~ to compare instead of checking .is_a? Regexp every time through the loop.
Fixed: added apostrophe to possessive noun.
Simplified the removal of xpaths in remove_xpaths. Added more tests for remove_xpaths.