harryC has asked for the wisdom of the Perl Monks concerning the following question:
use Win32::Clipboard; $text = Win32::Clipboard::GetText(); my $zoektekst=$text; while ($zoektekst) { if ($zoektekst=~ m%\d{13}\s+CG1%) { #zoek het extern nummer in de t +ekst van het clipbord #print "ext nr: $&\n"; $_=$&; s%\s+CG1%%; $externnummer=$_; print "\nextern nummer: $externnummer\n"; } if ($zoektekst=~ m%INSZ\s\d{6}\s\d{3}\s\d{2}%) { $_=$&; s%INSZ\s%%; $inznummer=$_; print "inz nummer : $inznummer \n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: line pro line match with Win32::Clipboard
by citromatik (Curate) on Jun 12, 2007 at 14:05 UTC |