in reply to Re: Regular Expressions
in thread Regular Expressions
I get the following error (Win2K, perl v5.8.6):#!/usr/bin/perl use strict; use warnings; my $test_string = "This is not a waffle"; print "Match: $1\n" if $test_string =~ /(?:f)\1/;
Note that this is actually referring to the lack of capturing parens. If I change the last line to
print "Match: $1\n" if $test_string =~ /((?:f)\1)/;
there are no errors but also no match. Interesting, if you ask me.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regular Expressions
by chas (Priest) on May 17, 2005 at 21:21 UTC | |
by Nkuvu (Priest) on May 17, 2005 at 21:37 UTC | |
by chas (Priest) on May 17, 2005 at 22:20 UTC | |
|
Re^3: Regular Expressions
by mrborisguy (Hermit) on May 17, 2005 at 20:31 UTC | |
|
Re^3: Regular Expressions
by maard (Pilgrim) on May 18, 2005 at 08:31 UTC |