Skip to main content

Module extract

Module extract 

Source
Expand description

The matched texts themselves, not their lines: every match (or one capture group of it) in order, or counted by value, most frequent first — grep -o | sort | uniq -c in one pass.

Structs§

Tally

Constants§

VALUES_MAX
Most different values counted; the matches of others are counted together.

Functions§

count
Counts the matched texts (or a capture group) by value. Returns None when cancelled.
extract
Calls on_value with the text of every match in range — capture group group of it (0: the whole match) — skipping matches where the group did not take part. Stops when it returns false.
tally_to_csv
The tally as CSV: value, matches, percent.
write_values_to
Writes every matched text (or group) on a line of its own, as UTF-8. Returns how many, or None when cancelled.