Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,任何人都可以使用正则表达式帮助获取给定 javascript 字符串中的所有单行和多行注释。
想法是用空引号替换单行和多行注释。这样我就可以从字符串中获取有效代码。
我正在寻找带有正则表达式的 javascript 解决方案。