Test, validate and match regular expressions
This JavaScript regex matches a complete HTML form element specifically named "loginForm", including its opening tag, inner content, and closing tag. It uses a non-standard negated character class `[^~]*?` to match the inner HTML across multiple lines, assuming the tilde (`~`) character does not appear inside the form. This pattern is useful for extracting login form structures from web pages during scraping or parsing tasks.