in reply to Entity statistics
Hello LexPl and welcome to the Monastery and to Perl in general.
One simple approach to your task would be to construct an array of your regex patterns, read your data file into a scalar as a string and then loop over the array and count the matches of each one in the string. To count matches in a string you can use this form:
my $count =()= $string =~ /regex/gs;These patterns often also contain ISO entities.
It isn't entirely clear to me precisely what you mean by this. Could you elaborate? It may or may not have any bearing on the task.
(Updated: typo fix - thanks, choroba.)
🦛
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Entity statistics
by choroba (Cardinal) on Nov 08, 2024 at 15:08 UTC | |
|
Re^2: Entity statistics
by LexPl (Beadle) on Nov 08, 2024 at 14:13 UTC | |
by hippo (Archbishop) on Nov 08, 2024 at 14:52 UTC | |
by LexPl (Beadle) on Nov 12, 2024 at 13:15 UTC | |
by choroba (Cardinal) on Nov 12, 2024 at 13:23 UTC | |
by LexPl (Beadle) on Nov 12, 2024 at 16:50 UTC | |
| |
by hippo (Archbishop) on Nov 12, 2024 at 13:34 UTC |