JavaScript Regex Replace with Matched Group Reference
JavaScript Regex Replace with Matched Group Reference: a task in Terminal-Lego-15k (Harbor dataset). You need to write a JavaScript solution that replaces text surrounded by underscores with HTML <em tags. For example, the string hello there should become hello <em there</em .
The task
You need to write a JavaScript solution that replaces text surrounded by underscores with HTML `<em>` tags. For example, the string `hello _there_` should become `hello <em>there</em>`.
Part of PrimeIntellect/Terminal-Lego-15k.