#!/usr/local/bin/perl -w use strict; my @words = qw/ beriberi coco couscous deed toot toto tutu assa ssaa /; for (@words) { print "$_\n" if /^(\w+)\1$/ || /^(\w+)(\w+)\2\1$/; }
beriberi coco couscous deed toot toto tutu assa
In reply to Re: Re: Conditional regex
by Roger
in thread Conditional regex
by chimni
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |