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.
我在文本文件中有维基媒体标签。即使在嵌套时,我也需要从开始到结束摆脱这些标签。我正在使用 Perl。
我在嵌套标签中遇到了困难。我将给出两个我无法删除的标签示例。
示例 1:
{{ text text text {{ text text}} text }}
示例 2:我们使用标签“]]”代替示例 1 中的“{{”。
[[ text text [[ text text]] text ]]
我希望有人能指出我来解决这个问题
您是否看过Can I use Perl 正则表达式来匹配平衡文本?
s/{{|}}//g;
将擦除{{或}}
{{
}}