Eric Engelhard <[EMAIL PROTECTED]> writes:
> Hi all,
>
> I am writing a perl script to process DNA sequences and want to use
> regular expressions to mark a site at known landmarks (exact sequence
> match) and cut the sequence both before AND after these landmarks. I
> promise to whip out the regexp O'Reilly book tonight, but I need a
> demo up in a couple hours. First correct answer scores a pint of hony
> beer (12% alcohol).
>
> -- Eric K. Engelhard
Will this work? Keep the beer if it does.
#!/usr/bin/perl
while (<>) {
chomp;
if (/(.*)(exactSequence)(.*)/) {
$beforematch = $1;
$match = $2;
$aftermatch = $3;
}
-Ricardo