{"id":43120055,"url":"https://github.com/malthejorgensen/repx","last_synced_at":"2026-01-31T19:33:37.830Z","repository":{"id":57461301,"uuid":"82228108","full_name":"malthejorgensen/repx","owner":"malthejorgensen","description":"Python regular expression file transformer","archived":false,"fork":false,"pushed_at":"2025-08-24T21:08:36.000Z","size":17,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-25T00:38:46.421Z","etag":null,"topics":["command-line-tool","data-analysis","text-processing"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/malthejorgensen.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}},"created_at":"2017-02-16T21:30:26.000Z","updated_at":"2025-08-24T21:08:39.000Z","dependencies_parsed_at":"2022-09-19T08:50:41.628Z","dependency_job_id":null,"html_url":"https://github.com/malthejorgensen/repx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/malthejorgensen/repx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malthejorgensen%2Frepx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malthejorgensen%2Frepx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malthejorgensen%2Frepx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malthejorgensen%2Frepx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malthejorgensen","download_url":"https://codeload.github.com/malthejorgensen/repx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malthejorgensen%2Frepx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28951405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T18:30:42.805Z","status":"ssl_error","status_checked_at":"2026-01-31T18:30:19.593Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["command-line-tool","data-analysis","text-processing"],"created_at":"2026-01-31T19:33:37.256Z","updated_at":"2026-01-31T19:33:37.826Z","avatar_url":"https://github.com/malthejorgensen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"repx\n====\nPython regular expression file transformer.\n\nIf you know `sed` or `awk` – or even `vim`'s search \u0026 replace functionality,\n`repx` should feel familiar, but simpler and easier to use.\n\n`repx` is similar to [sd](https://github.com/chmln/sd).\n\nUsage\n-----\nBy default `repx` will take input from _standard in_ and output the transformed text to _standard out_\n\n```ShellSession\n$ echo 'Hello World!' | repx /World/Universe/\nHello Universe!\n```\n    \nFile input is of course also supported\n\n```ShellSession\n$ cat in.txt\nI like command line tools!\n$ repx /like/love/ in.txt\nI love command line tools!\n```\n\nFiles can be transformed in-place with `-i`/`--in-place`\n\n```ShellSession\n$ cat in2.txt\nI like turtles!\n$ repx -i /like/love/ in.txt int2.txt\n$ cat in.txt\nI love command line tools!\n$ cat in2.txt\nI love turtles!\n```\n\nBackreferences are supported both for normal search and during\nsubstitution, but backslash escapes on the command line can be tricky,\nso it can be helpful to use `\\g\u003c1\u003e` in place of `\\1`:\n\n```ShellSession\n$ repx -i '/YAML(Reader|Writer)/JSON\\1/' [files...] # Won't work\n$ repx -i '/YAML(Reader|Writer)/JSON\\g\u003c1\u003e/' [files...] # Will work\n```\n\n\nTypical use\n-----------\nTypical use is within a git repository and the `-i` option.\n`-i` will irreversibly change the files passed on the command line so\nbe sure to commit previous changes before running the command.\nUsually you will use `repx`  in tandem with `git grep -l` like\nso:\n\n```ShellSession\n$ repx -i /YAMLReader/JSONReader/ $(git grep -l YAML)\n# All files in the git repository containing \"YAML\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalthejorgensen%2Frepx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalthejorgensen%2Frepx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalthejorgensen%2Frepx/lists"}