Subject: | Regexp::Assemble can produce invalid regexp |
Date: | Tue, 3 Jun 2008 14:33:52 +0200 |
To: | bug-Regexp-Assemble [...] rt.cpan.org |
From: | "Yves BLUSSEAU" <cbw3qq202 [...] sneakemail.com> |
Hi,
I have a big problem when using Regexp::Assemble
The program:
#!/usr/bin/perl -w
use strict;
use Regexp::Assemble;
my $ra = Regexp::Assemble->new;
$ra->add('a|b|[cd]');
print $ra->re,$/;
The result is:
(?-xism:a\|b\|[cd])
That is wrong because Regexp::Assemble have added a \ before the pipe, so
now the regexp match the pipe char not the alternation metacharacter |
Regards