advanced
Nested Regex Parser
Create a parser that validates strings with nested balanced parentheses using only regex.
📝 Contenu du Prompt
Write a JavaScript function that uses a single regular expression to validate if a string contains correctly nested and balanced parentheses. The string may contain other characters. Ensure your solution handles edge cases like empty strings and deeply nested structures.