Gregex.dll
From GMWiki, the Gamemaker Wiki.
| gregex.dll |
| Created by: Yourself |
| Download: None yet |
| Synopsis: Use regular expressions in a manner simliar to PHP's preg extension. |
Contents |
[edit] Overview
One thing I've wanted that Game Maker lacks is the ability to perform regular expression matching. What is regular expression matching? In short, regular expressions are a language for describing a pattern in a string. These can be useful for many things like validating user input, parsing important information out of files, or even formatting data. This DLL contains many useful functions for working with regular expressions. I hope to explain how to use the DLL and provide a bit of an introduction to regular expressions in this documentation.
[edit] Setup and Installation
- Extract the DLL and the API scripts (gregex_API.gml).
- Copy the DLL into the same directory as your project.
- To use the API from Game Maker, go to Scripts >> Import Scripts... and select gregex_API.gml to load it.
That's all that's required to use this DLL and the API.
[edit] Functions
- Housekeeping
- Regex Matching
- Result Set
- Replace

