Help for this page

Select Code to Download


  1. 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;
    
  2. or download this
    Here are [[a variable]] number [[of words]] in brackets
    Here are a_variable number of_words in brackets
    
  3. or download this
    sub blank2under {
      my $x=shift;
      $x =~ s/ /_/g;
      return $x;
    }
    
  4. or download this
    sub rx (&$) {
      my $c_regex=shift;
    ...
    print "$x\n";
    $x =~ s(\[\[(.*?)\]\])( rx {s/ /_/g} $1 )ge;
    print "$x\n";