Count Repeated Lines

Count Repeated Lines lets you report the frequency of each exact line without losing first-seen order. Enter your own values or load the worked example.

Method and calculation

Report the frequency of each exact line without losing first-seen order.

Inputs and settings

Count Repeated Lines accepts Input text.

Worked example

Count Repeated Lines example — Input text: "Hello world\nA second line\nHello world". Computed output: [ { "line": "Hello world", "count": 2 }, { "line": "A second line", "count": 1 } ]

Output and limitations

Repeated records are reported alongside their exact frequency. The comparison is case-sensitive and includes whitespace, so a padded record is distinct from an unpadded record. First-seen ordering is preserved to help relate the report back to the original input.

Technical references: JavaScript Unicode normalization

Count Repeated Lines FAQs

Count Repeated Lines applies the following rule to your input: Report the frequency of each exact line without losing first-seen order. The worked example on this page uses the same processor as the result button.
Count Repeated Lines has these boundaries: Input is treated as plain text; it is never executed. Start by checking the input text field against the units or format shown.
Count Repeated Lines provides this sample: [ { "line": "Hello world", "count": 2 }, { "line": "A second line", "count": 1 } ]. Use the sample button to reproduce it, then replace the inputs with your own values.