fireartist has asked for the wisdom of the Perl Monks concerning the following question:
Output:#!/usr/bin/perl use warnings; use strict; use Data::Dumper; use URI; my $text = <<END; this is some plain text here is a link: [link://forum] and here is another: [mentors://pil_description|Partnerships in Learning] END $text =~ s! \[ (\w+) :// ([\w-]+) (?:|([^]]+))? \] !print("'$1' '$2' '$3'\n")!gsex;
Are any of my modifiers (/gsex) affecting the capturing, or is there anything else I'm missing?'link' 'forum' '' 'mentors' 'pil_description' '|Partnerships in Learning' Use of uninitialized value in concatenation (.) or string at test.pl l +ine 13.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regexp Non-capturing Grouping failure
by fireartist (Chaplain) on Sep 01, 2004 at 10:02 UTC | |
by herveus (Prior) on Sep 01, 2004 at 10:54 UTC | |
by Crian (Curate) on Sep 01, 2004 at 10:17 UTC |