This error occurs because the regular expression '/?/' contains a repetition operator '?', which is not preceded by any character or sub-expression to repeat.

To fix this error, you can remove the '?' operator or specify a valid character or sub-expression before it. For example, if you want to match a single question mark character, you can use the regular expression '/?/gm'.

JavaScript SyntaxError: Invalid Regular Expression: /?/gm: How to Fix

原文地址: https://www.cveoy.top/t/topic/neVF 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录