polished xpath/regex test