Skip to content

CSMRu/text-multi-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text Multi Search

Version Hosted on GitHub Pages English 한국어

Client-side text processor for simultaneous multi-keyword search, batch replacement, and pattern analysis.

🧩 Syntax Cheat Sheet

Enter each rule on a new line.

Keyword Description Example Result
Text Basic Match. Highlights text. Hello Highlights "Hello"
A///B Replace. Substitutes A with B. fix///fixed Replaces "fix" → "fixed"
[line] Line Mode. Selects entire line if match found. [line]Hello Selects whole line containing "Hello"
[del] Delete. Removes match (or line). [line]Log///[del] Deletes lines containing "Log"
[or] Logic. Match A OR B. App[or]Web Matches "App" or "Web"
[num] Digits. Captures numbers ($1). ID:[num] Matches "ID:123"
[cjk] Chinese Characters. Captures ideographs ($1). [cjk] Matches "山", "文"
[kor] Korean characters. Captures Korean char ($1). [kor] Matches "가", "힣", "ㄴ", "ㅟ"
/// Comment. Ignored line. /// Title (Ignored)

Replacement Variables

Captured wildcards ([num], [cjk], [kor]) can be used in replacement.

  • Item [num]///Item #$1 → "Item 10" becomes "Item #10"
  • [num]-[num]///$2.$1 → "2024-01" becomes "01.2024"

⚖️ Matching Priority (The 3 Laws)

The engine scans the text in a single pass. If multiple rules could match the same part of the text, the winner is decided by these laws in order:

  1. [line] Mode (Super Law): Rules starting with [line] always take precedence over word-level rules. If a line matches, it is processed first as a whole.
  2. Leftmost First: The match starting earliest in the text wins.
    • Input: Banana | Rules: na, BaBa wins (starts at index 0).
  3. Longest First: If start positions are identical, the longer match wins.
    • Input: AppleJuice | Rules: Apple, AppleJuiceAppleJuice wins (10 chars vs 5).
  4. First Defined: If both position and length are identical, the rule defined higher in the list wins.
    • Input: Test | Rules: 1. Test 2. Test///Done1st rule wins (Replacement fails).

⚡ Common Patterns

Goal Pattern Rule Explanation
Slim Logs [line]Info [or] Debug///[del] Deletes Info/Debug lines to keep only Errors.
Mask Phone 010-[num]-[num]///010-****-$2 Hide middle digits: 010-1234-5678010-****-5678.
Clean Terms Signin[or]Log-in///Login Unify inconsistent terms into Login.
Extract IDs [line]User_id: [num]///$1 Replaces whole line with just the ID number.
Mask Name [cjk][cjk][cjk]///$1*$3 Hide middle Hanja: 金閣寺金*寺.
Format Data [num]x[num]///W:$1 H:$2 Reformat 1920x1080W:1920 H:1080.

⌨️ Shortcuts & Mode

  • Manual Edit: Click (Unlink) to type directly in the result.
  • Copy Source: Ctrl + Alt + C (In Development).

License

MIT License. View Source.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published