Intro to Regex
Regular Expressions or “regex” are sequences of characters used to find patterns in text. Common applications of these in modded Minecraft are in mods like KubeJS or Reliable Remover, where one could bulk group blocks/items together and perform operations on them.
Examples
| Regex string | Caught registries |
|---|---|
/^minecraft:.+?bed/ | Items ending in “bed” under the Minecraft namespace |
/^minecraft:pink_.+/ | Items beginning with “pink” under the Minecraft namespace |
/^minecraft:.*quartz.*/ | Items containing “quartz” under the Minecraft namespace |
/^*ingot.*/ | Items containing “ingot” under any namespace |
More Information
Tags: regex