Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:A9T9 RPA Text Search and Match

From Leeroopedia
Knowledge Sources
Domains OCR, Text_Search
Last Updated 2026-10-22 00:00 GMT

Overview

Mechanism for searching for a specific text string within OCR recognition results and returning the matching words with their screen coordinates.

Description

Text Search and Match is the post-OCR step that finds a user-specified text string within the recognized words. The search takes the OCR response (an array of positioned words) and a search text string, and returns the matching word group with bounding-box coordinates.

The search supports:

  • Fuzzy matching: by default, case-insensitive substring matching
  • Exact matching: the `[exact]` bracket syntax forces whole-string, case-sensitive matching
  • Wildcards: `*` and `?` wildcard patterns
  • Index selection: return the Nth match (0-based) when the text appears multiple times
  • Exhaust mode: return all matches at once

The matched words' bounding boxes are used to compute the click target — typically the center of the first matched word, optionally adjusted by an offset (`uiv.offset`).

Usage

Use this principle when an OCR-based automation system needs to find a specific text label and click on it or verify its presence.

Theoretical Basis

matches=search(searchText,words,mode)

Where `searchText` is tokenized into words and matched against sequences of positioned OCR words:

matchi={wj,wj+1,…,wj+n−1}∣compare(searchWords,[wj…wj+n−1])

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment