The regular expression '/?/gm' is causing a syntax error because the '?' character is used to indicate that the preceding pattern is optional. However, in this case, there is no preceding pattern before the '?', hence the error 'Nothing to repeat'.

To fix this error, you need to remove the '?' character or add a pattern before it. For example, if you want to match a question mark character, you can escape it with a backslash '?':

/\?/gm

Alternatively, if you want to make the preceding pattern optional, you need to specify a pattern before the '?'. For example, to match zero or one occurrence of the letter 'a', you can use:

/a?/gm
Alist System Error: SyntaxError: Invalid Regular Expression: /?/gm: Nothing to Repeat

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

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