{"id":18268578,"url":"https://github.com/viral32111/gm_regex","last_synced_at":"2025-07-21T04:06:20.136Z","repository":{"id":133672451,"uuid":"221928848","full_name":"viral32111/gm_regex","owner":"viral32111","description":"Lua Patterns are rubbish, Regular Expressions are the standard.","archived":false,"fork":false,"pushed_at":"2022-01-01T10:57:04.000Z","size":23,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-19T07:50:38.349Z","etag":null,"topics":["cpp","cpp11","dll","garrysmod","glua","lua","module","regex","visual-studio"],"latest_commit_sha":null,"homepage":"https://github.com/viral32111/gm_regex","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viral32111.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-15T13:24:18.000Z","updated_at":"2025-02-20T09:05:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"714b874e-06be-44fd-9447-d047f7eadb14","html_url":"https://github.com/viral32111/gm_regex","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/viral32111/gm_regex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viral32111%2Fgm_regex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viral32111%2Fgm_regex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viral32111%2Fgm_regex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viral32111%2Fgm_regex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viral32111","download_url":"https://codeload.github.com/viral32111/gm_regex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viral32111%2Fgm_regex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266236670,"owners_count":23897222,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cpp11","dll","garrysmod","glua","lua","module","regex","visual-studio"],"created_at":"2024-11-05T11:32:16.180Z","updated_at":"2025-07-21T04:06:20.086Z","avatar_url":"https://github.com/viral32111.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Regex\n\n**Project started: 15/11/2019, Last updated: 15/11/2019**\n\nThis is a C++ module for Garry's Mod which gives developers access to the Regular Expressions string matching standard. I wanted to make this because [Lua Patterns](https://wiki.garrysmod.com/page/Patterns) are limited in functionality and useless to learn if you've already learned Regex (also when there's already a standard in place they should never have been created in the first place)\n\n### Installation\n1. Download the [latest release](https://github.com/viral32111/gm_regex/releases) binary file for your operating system (`win32` for Windows, `osx` for MacOS and `linux` for Linux)\n2. Rename the DLL prefix to match the realm you'll be using it on. (e.g. rename it to `gmsv_regex_win32.dll` if you're using it serverside on Windows, or `gmcl_regex_win32.dll` if you're using it clientside on Windows, etc.)\n3. Navigate to your server's root directory (where srcds.exe, garrysmod, bin, etc. are)\n4. Create a new folder inside `garrysmod/lua/` called `bin` if it doesn't already exist.\n5. Place the renamed module (dll) into that folder.\n6. Use the module in any Lua script by calling `require(\"regex\")`.\n\n### Usage\nHere is a basic example on how to use this module:\n```lua\nrequire(\"regex\")\nlocal message = \"viral32111\u003c76561198168833275,STEAM_0:1:104283773\u003e said \\\"Hello World!\\\"\"\nlocal regularExpression=\"^(.+)\u003c(\\\\d{17}),(STEAM_\\\\d:\\\\d:\\\\d+)\u003e said \\\"(.*)\\\"$\"\nlocal matches = regex.match(message,regularExpression)\nPrintTable(matches)\n```\n\nThe output of this would be:\n```\n0       =       viral32111\u003c76561198168833275,STEAM_0:1:104283773\u003e said \"Hello World!\"\n1       =       viral32111\n2       =       76561198168833275\n3       =       STEAM_0:1:104283773\n4       =       Hello World!\n```\n\n(For more examples, check the [examples folder](examples))\n\n### Generating a project\nRun `build.bat` to generate a Visual Studio 2019 for Windows using the supplied premake5 configuration. This will create a new folder called `project` which will contain the Visual Studio project/solution files.\n\n### Building *(Visual Studio 2019)*\nOnce you've made your changes to the source code, press CTRL+B (or Build \u003e Build gm_steam). This will generate the .dll file inside a `build` folder.\n\n###### [Copyright 2019 - 2022 viral32111](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviral32111%2Fgm_regex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviral32111%2Fgm_regex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviral32111%2Fgm_regex/lists"}