- 我知道这是一个常见问题,但我搜索了很多并没有找到我需要的
- 我正在尝试创建简单的降价插件,但我无法匹配块代码我尝试了这个正则表达式
/(^\`{3}[\w|\W]+\`{3})/gm
,但它让我得到了第一个和最后一个重音之间的所有东西,如果有另一个块代码,它会将它们全部添加到一个
- 例如以下字符串
```
block code
word1
word2
```
word without grave accent and it is will match it too
```
another block code
word1
word2
- it's will match it as part of the first block code
```
"""
some text after the grave accent text
word1
word2
"""`
0: "``` \nblock code\nword1\nword2\n```\n\nword without grave accent and it's will match it too\n\n```\nanother block code\nword1\nword2\n- it's will match it as part of the first block code\n```"
length: 1
0: "``` \nblock code\nword1\nword2\n```"
1: "```\nanother block code\nword1\nword2\n- it's will match it as part of the first block code\n```"
length: 2