Hi,
I tried with qr{} (after readind the perlop manpage as tom suggested)
and the pattern results in stdout as this:
^(?:(?-xism:ara\w+))[^A-Z]*((?-xism:[A-Z]+))[^A-Z]*(?!arabo)
It's quite strange: the first and second element have got a pair of
brackets more and I don't understand what -xism does mean.
Any help is appreciated,
adriano allora
Il giorno 20/gen/06, alle 17:22, Tom Phoenix ha scritto:
On 1/20/06, Adriano Allora <[EMAIL PROTECTED]> wrote:
my $form1 = qw(ara\w+);
my $pos1 = qw([A-Z]+);
my $lemma1 = qw(?!arabo);
my $pattern = "^(?:$form1)[^A-Z]*($pos1)[^A-Z]*($lemma1)\n";
You probably don't have the pattern you think you have. Have you tried
printing $pattern to see what it contains?
In general, it's difficult to assemble a pattern from strings when
metacharacters may be involved. But it helps to use qr// instead of
qw//, since the former has the same "metacharacter sense" as normal
Perl patterns. See the documentation of qr// in the perlop manpage.
Does that get you closer to a solution? Good luck with it!
--Tom Phoenix
Stonehenge Perl Training
|^|_|^|_|^| |^|_|^|_|^|
| | | |
| | | |
| |*\_/*\_/*\_/*\_/*\_/* | |
| |
| |
| |
| http://www.e-allora.net |
| |
| |
**************************************
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>