Appearance
Regex Rules Guide
Why regex exists in this plugin
Some Unity assets (especially serialized raw data assets) store localizable text inside text blobs. Regex rules let the plugin find those strings reliably during extraction.
Extraction pipeline
- Select asset and run extraction.
- Plugin uses the active
Extraction Preset. - Raw text regex scan runs only if the asset type is listed in
Raw-Data Scan Types. - Plugin chooses regex rules:
- Built-in rules by asset type (if available).
- Optional per-type custom rules are applied:
Replace Built-Inenabled: only custom rules are used for that type.Replace Built-Indisabled: built-in and custom rules are merged.
- If no type rule is available, fallback rules from
Project Settings > Hyper PO Localizationare used. - For each regex match, plugin reads capture groups from left to right.
- The first non-empty capture group becomes the extracted string.
- String is normalized and deduplicated.
Pattern requirements
- Every pattern must include at least one capture group:
(...). - Use precise key anchors when possible (
_text,description,button, etc.). - Prefer non-greedy operators (
*?) to avoid over-capturing. - Avoid patterns that match symbols-only fragments.
Common examples
- JSON-like text field:
- Pattern:
_text\"\\s*:\\s*\"((?!_)[\\s\\S]*?)\"
- Pattern:
- XML-like button label:
- Pattern:
button=\"([^\"]*)\"
- Pattern:
Faster setup
- Select an asset in Project.
- Open
Project Settings > Hyper PO Localization. - In
Per-Type Custom Regex Rules, clickImport From Selected Asset. - The plugin creates a prefilled rule for that exact type name.
Troubleshooting
- No strings extracted:
- Pattern has no capture group.
- Pattern does not match the serialized format used by that asset.
- Too many noisy strings:
- Pattern is too broad; add stronger anchors.
- Use non-greedy quantifiers and narrower character classes.
- Broken regex:
- Validate in
Regex Testerinside Project Settings before running extraction.
- Validate in