Community listing page, reviews here may not be monitored by the author.
Regex Library Datapack
No reviews yet
A datapack library that provides a way to match substrings using regular expressions.
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
This library requires Moxlib to function.
GMDU Regex Library
by Gears and Moxvallix.
Overview
This library provides a simple regular expression parser, working entirely in mcfunction.
Current Features and Metacharacters
| Character | Example | Description |
|---|---|---|
[] |
[abc] |
Character set |
[^] |
[^abc] |
Inverted character set |
[x-y] |
[A-Z] |
Character range |
() |
(ab) |
Group |
. |
. |
Wildcard |
| |
(a|b) |
Or |
^ |
^abc |
Beginning of string |
$ |
xyz$ |
End of string |
? |
ab? |
Zero or one of the preceding token |
* |
ab* |
Zero or more of the preceding token |
+ |
ab+ |
One or more of the preceding token |
\ |
\+ |
Escape following character |
If you need help creating your regex pattern, we recommend using RegExr.
Not all features from RegExr are supported in our library, see table above.
Getting Started
This library uses a simple api. The string to match is given in target,
and the regex to match with is set in pattern. These are set in the storage,
regex:api/match
To run the match, run function regex:api/match.
Example
data modify storage regex:api/match target set value "Hello, World!"
data modify storage regex:api/match pattern set value "[A-Za-z]+"
function regex:api/match
{
success: 1b,
output: ["H","e","l","l","o"]
}
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers