A Cheat Engine plugin for scanning process memory with regular expressions.
- Scan selected memory regions using Cheat-Engine-like protection flags
RWXC - Multiple regex engines supported
- Return match addresses and matched text back to Lua
- Configuration:
- encoding
- regex engine
- case sensitivity
- minimum / maximum extracted string length
- find-one mode
- Windows
- VS2026 with C++ desktop development tools
vcpkg
lua 5.3(provided)CE SDK v5.0.0(provided)
re2pcre2
If you do not already have vcpkg integrated with Visual Studio:
vcpkg integrate install
From the solution directory, run:
vcpkg install
Release | x64
- Copy the compiled DLL to
Cheat Engine\plugins - Open Cheat Engine
- Go to
Edit -> Settings -> Plugins Add newthe plugin DLL- Check the added plugin and hit
OK
The plugin exposes a Lua entrypoint for regex-based memory scanning.
lregexScan( { pattern, protectionFlags, encoding, regexEngine, findOne, caseSensitive, minLength, maxLength } )A dictionary table with the following fields (all optional except for pattern):
pattern- Regex pattern string
protection- Cheat Engine-style protection filter string
encoding- String extraction encoding, such as
"ASCII"or"UTF16"
- String extraction encoding, such as
engine- Regex engine name, such as
"STD","RE2", or"PCRE2"
- Regex engine name, such as
findOne- Boolean flag that stops after the first match if enabled
caseSensitive- Boolean flag for case-sensitive matching
minLength- Minimum extracted candidate string length
maxLength- Maximum extracted candidate string length
On success, it returns a table with dictionaries of two fields:
address- Integer pointing to the start of the matched string in the target
text- String containing a matched string
Returns nil on any failure or if no matches
return lregexScan({
pattern = [[Godot\sEngine\s]],
protection = "WR-E-C",
encoding = "ASCII",
engine = "RE2",
findOne = true,
caseSensitive = true,
minLength = 8,
maxLength = 20
}) or {}Currently supported:
ASCIIUTF-16LE BMP
STDuses std::regexRE2- Faster and safer
- Does not support the full PCRE-style feature set
- Good for portable and simpler patterns
PCRE2- Supports more advanced syntax
- Suitable for patterns using features such as lookaheads
Engine-specific syntax is allowed when that engine is selected
This project is released under the MIT License. See LICENSE for details.