Text & Lists
Occurrences Counter
Count occurrences in the supplied input. Enter the text, set the transformation rules, then copy the result.
This tool runs open-source code from CyberChef by GCHQ (Apache License 2.0). See open-source credits.
Occurrences Counter counts a search string in the input using regex, extended escapes, or simple-string matching.
2 Processing runs in the browser.
Instructions
- Provide text or data for this tool.
- Enter the search string in the operation field.
- Choose the matching mode that fits literal or regex input.
- Check zero matches before assuming the source contains the value.
Example
Input: red red blue
Settings: Occurrences Counter: Search for 'red' with Simple string.
Result: 2
Limits
- Occurrences Counter: Invalid regular expressions return zero rather than a match count.
- Occurrences Counter: The regex path uses case-insensitive matching.
- Occurrences Counter: The operation runs in the browser and does not need a network service.