Skip to content
Regular expressions for GameMaker Studio 2
JavaScript Game Maker Language
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
LICENSE
README.md

README.md

Regular expressions in GameMaker Studio 2 (HTML5 export only)

Notes:

  • HTML5 export only at the moment. A JavaScript extension actually does the regex.
  • Escape backslashes in regular expression strings!
  • Ensure regex matches is_array() before performing operations

How to use:

After importing the .yy extension:

var matches = regex("The quick brown fox jumps over the lazy dog.",
  "\/\\b(\\w*[a-zA-Z]\\w*)\\b\/g");

if (is_array(matches))
  show_debug_message(matches); // {"The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"}

Author

You can’t perform that action at this time.