{"id":19084317,"url":"https://github.com/userr00t/regexreplacer","last_synced_at":"2025-07-07T02:03:23.169Z","repository":{"id":106328971,"uuid":"401429240","full_name":"UserR00T/RegexReplacer","owner":"UserR00T","description":"A simple C# program that you can use to replace text in a specified regex/blob pattern of files.","archived":false,"fork":false,"pushed_at":"2021-09-13T12:46:36.000Z","size":16,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-28T02:45:19.459Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UserR00T.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-08-30T17:26:40.000Z","updated_at":"2021-09-13T12:42:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"fe39b96b-dec7-4e7c-b43b-038977bfa722","html_url":"https://github.com/UserR00T/RegexReplacer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/UserR00T/RegexReplacer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UserR00T%2FRegexReplacer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UserR00T%2FRegexReplacer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UserR00T%2FRegexReplacer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UserR00T%2FRegexReplacer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UserR00T","download_url":"https://codeload.github.com/UserR00T/RegexReplacer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UserR00T%2FRegexReplacer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262647350,"owners_count":23342637,"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":[],"created_at":"2024-11-09T02:50:50.162Z","updated_at":"2025-06-29T18:32:30.800Z","avatar_url":"https://github.com/UserR00T.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RegexReplacer\nA simple C# program that you can use to replace text in a specified regex/blob pattern of files.\n\n## Download\nVisit [Releases](https://github.com/UserR00T/RegexReplacer/releases/latest) for an binary. Linux users can download the binary directly, and windows users have to extract the zip file to run it. This will be changed in the future when I have access to an .NET 5 windows VM to compile with again. Tracking in #1.\n\n## Building\nExecute `dotnet build` on either the `sln` or `RegexReplacer.csproj`. \n\n## Why\nI needed this for a massive replace on a large scale project based on a specific regex and blob. I thought others may find this useful as well and decided to release it. For that reason don't expect the best documentation nor support on this project.\n\n## Running\nBy default, you can just run the `.exe` on windows and the binary directly on linux. If no arguments are provided it will use `regexreplacer.json` in the same folder as configuration file.\nIf an argument was provided however, it'll use that path/file for settings.\n\n## Configuration\nBy default, running the program once without an `regexreplacer.json` file in the working directory will create an example file. Using that file, you can configure how RegexReplacer will work.\n\n`regexreplacer.json`:\n```json\n{\n  \"patterns\": [\n    {\n      \"path\": \"/tmp/your_directory\",\n      \"searchBlob\": \"*.*\",\n      \"matcher\": \"aa\\/\",\n      \"replace\": [\n        {\n          \"from\": \"hello\",\n          \"to\": \"goodbye\",\n        }\n      ],\n      \"searchOptions\": 1\n    }\n  ]\n}\n```\nThis pattern will change all files (recursively) inside the folder `/tmp/your_directory` where the path matches the regex `aa/`. Once it lists these files, it will try to replace the word `hello` with `goodbye`.\n\n_Note_ `patterns` is an array and multiple patterns are allowed.\n\n`/tmp/your_directory/aa/afile.txt`\n```txt\nhello world, this is my great test file!\n```\nWill get changed to:\n```txt\ngoodbye world, this is my great test file!\n```\n\nWhile `/tmp/your_directory/adifferentfile.txt` will not get changed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuserr00t%2Fregexreplacer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuserr00t%2Fregexreplacer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuserr00t%2Fregexreplacer/lists"}