#!/usr/bin/perl use strict; use warnings; while (<>) { print "found '$1'\n" if /:([^;]+)/; } __END__