I would like to test for Unicode Regex Property Escapes to avoid compiling a broken regular expression in browsers that do not support it (for example IE11). Ideally, I\'d like
This works in Firefox or Safari; should be okay in IE11:
let regex = /somereplacementregex/; try { regex = new RegExp ("\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F", "gu"); } catch (e) { } // // use regex... console.log (regex);