regex href html pattern code example Example: regex href html pattern <a\s+(?:[^>]*?\s+)?href=(["'])(.*?)\1