给定一个url,以下正则表达式可以在URL中的某些点处插入/替换单词。 代码: #!/usr/bin/perl
use strict;
use warnings;
#use diagnostics;
my @insert_words = qw/HELLO GOODBYE/;
my $word = 0;
my $match;
while (<DATA>) {
chomp
有没有办法在组上进行替换? 说我想根据自定义格式在文本中插入链接。因此,鉴于这样的事情: This is a random text. This should be a [[link somewhere]]. And some more text at the end.
我想 This is a random text. This should be a <a href="/link_some