How to use the isRegExp function from xregexp
Find comprehensive JavaScript xregexp.isRegExp code examples handpicked from public code repositorys.
GitHub: gorpo/Rextester-bot-v3
27 28 29 30 31 32 33 34 35 36
const nonCapturingGroup = (content = '') => `(?:${content})`; const anchors = /^\^|\$$/g; const processInterpolation = v => XRegExp.isRegExp(v) ? nonCapturingGroup(v.source.replace(anchors, '')) : nonCapturingGroup(XRegExp.escape(v)); const regex = (flags) => (s, ...args) =>
0
0
1
xregexp.exec is the most popular function in xregexp (52 examples)