kamel has asked for the wisdom of the Perl Monks concerning the following question:
Part of the data-file: keywords to be found: Clinic, Surgon, Patient Code, ...#test.pl - testfile with the heart of the parser #open the file to search trough unless (open FILE, "<../perl/testproto/Protokoll.log") { die "Cannot open Keywordfile: $!\n"; } #search for the regexp in the file while (<FILE>) { chomp; if (/.*Cl(.*)/) { print $1; } else { print "Keine Treffer.\n"; } }
S: 07:02:36 ---------------------------------------------------------- +---------- S: 07:02:36 Clinic: Knie Klinik S: 07:02:36 Surgon: Prof X S: 07:02:36 Patient Code: Kiro S: 07:02:36 Size: 30 cm S: 07:02:36 Weight: 50 kg S: 07:02:36 Birthdate: Sa 1. Jan 2000 S: 07:02:36 Sex: male S: 07:02:36 Indication:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: work with unicode data and regexps
by allolex (Curate) on Feb 10, 2003 at 09:42 UTC | |
|
Re: work with unicode data and regexps
by dakkar (Hermit) on Feb 11, 2003 at 15:49 UTC |