CountMatches / String Layer

Count non-overlapping occurrences of a pattern in each string. Similar to Python's len(re.findall()). Returns a numeric column with match counts. Useful for:

  • Word frequency analysis
  • Data validation (e.g., counting format violations)
  • Feature extraction from text
  • Analyzing pattern repetitions
Table
0
0
Table

Select

column

The string column to analyze. Each value will be searched for all non-overlapping matches of the pattern.

Pattern

string

Regular expression pattern to count. Examples:

  • \b\w+\b for word count
  • [0-9]+ for number sequence count
  • @\w+ for mention count
  • https?:// for URL count

Uses Rust regex syntax. Non-overlapping means each character is counted only once.

false

If true, treats Pattern as plain text rather than regex. Useful for:

  • Counting exact string occurrences
  • When pattern contains regex metacharacters
  • Simple substring counting

Name for the new column. If not provided, the system generates a unique name. If AsColumn matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.