- or download this
my $x = q{Here are [[a variable]] number [[of words]] in brackets};
say $x;
$x =~ s{\[\[(.*?)\]\]}{ (my $x=$1) =~ s/ /_/g; $x }ge;
say $x;
- or download this
Here are [[a variable]] number [[of words]] in brackets
Here are a_variable number of_words in brackets
- or download this
sub blank2under {
my $x=shift;
$x =~ s/ /_/g;
return $x;
}
- or download this
sub rx (&$) {
my $c_regex=shift;
...
print "$x\n";
$x =~ s(\[\[(.*?)\]\])( rx {s/ /_/g} $1 )ge;
print "$x\n";