Search And Replace (Mikey)
Search And Replace (Mikey) — ComfyUI Node
- STRING
This is one of those nodes where the README gives you exactly one line - "searches a text for placeholders and replaces them" - and leaves the rest to context. The context is useful, though: Mikey Nodes ships its own wildcard engine (the __word__ syntax documented at the top of the pack's README), and this node lives in the same neighborhood as the pack's other placeholder-processing nodes, LoraSyntaxProcessor and WildcardAndLoraSyntaxProcessor. So take the one-line description at face value: you feed it text, it finds placeholder tokens in there, and it replaces them.
What it's almost certainly doing
Based on the two inputs it actually exposes - a raw text string and a seed - this is very likely running the pack's wildcard resolver over whatever text you hand it, rather than doing a literal find-and-replace with fixed search/replace strings (there's no separate "search for" / "replace with" field in the schema, so the placeholders live inside the text itself). That lines up with the README's wildcard syntax: __wildcard__ pulls a random line from ComfyUI/wildcards/wildcard.txt, 2$$__wildcard__ grabs two lines, __wildcard|word__ filters to lines containing "word," and __!wildcard__ locks the selection to a specific line instead of rerolling every time. The seed input is what makes that selection reproducible - same seed, same picks, which matters if you're trying to recreate a specific generation later.
Inputs and output
text- a single-line string carrying whatever placeholder syntax you're resolving.seed- drives which wildcard lines get chosen when there's randomness involved.
It outputs one plain STRING - the resolved text, ready to feed into a CLIP Text Encode node or a Save Image filename or wherever else you need a fully-expanded prompt.
Installing it
Through ComfyUI Manager, search "Mikey Nodes" and install. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/bash-j/mikey_nodes
Restart ComfyUI afterward. Nothing beyond that in the README for this node - no separate model or dependency to fetch.
Troubleshooting
If your placeholders come through untouched (you see literal __wildcard__ text in your output image's prompt), the usual cause across this whole pack's wildcard system is a folder mismatch: wildcard files need to live in ComfyUI/wildcards/, and the filename (minus .txt) is exactly what goes between the double underscores. A typo there fails silently - you just get your placeholder text back verbatim instead of an error.
Since a real find/replace with two separate search-string and replace-string fields would need more inputs than this node has, don't expect literal string substitution here the way you'd get from a scripting language's .replace() - if that's what you actually need, TextPreserve or a plain string-concat node from another pack is a better fit. This node's whole reason to exist is placeholder expansion, and its pairing with seed is the tell.
One thing worth knowing if you're new to this pack: it's the kind of utility grab-bag you often end up installing not because you went looking for it, but because a workflow you downloaded off CivitAI needed it alongside Impact Pack, KJNodes, and half a dozen others. That's a completely normal way to acquire it, and it's fine to leave installed even if you only ever end up using this one node out of the whole set.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| seed | INT | 00–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |