in reply to Using regex to match double letters, and only double letters
#!/usr/bin/perl -w use strict; while (<DATA>) { next if ($_ !~ /([A-Za-z])\1/); print; } __DATA__ balloon hello world foo bar perlmonks merry christmas
Which gives:
balloon hello foo merry
See perlre for more information.
Hope this helps,
Darren :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using regex to match double letters, and only double letters
by kwaping (Priest) on Dec 30, 2005 at 02:51 UTC | |
|
Re^2: Using regex to match double letters, and only double letters
by Anonymous Monk on Dec 30, 2005 at 02:07 UTC | |
by aquarium (Curate) on Dec 30, 2005 at 02:51 UTC | |
by kwaping (Priest) on Dec 30, 2005 at 02:54 UTC |