const pattern = /<.+?>/g;Literal character: a, b / notebook
Literal character: a, b
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
/^[😄]$/.test("😄"); // false, because the pattern is interpreted as /^[\ud83d\ude04]$/
/^😄+$/.test("😄😄"); // false, because the pattern is interpreted as /^\ud83d\ude04+$/const pattern = /a\nb/;
const string = `a
b`;
console.log(pattern.test(string)); // true