{"id":16540424,"url":"https://github.com/grokzen/repy","last_synced_at":"2026-05-12T04:36:41.916Z","repository":{"id":66135610,"uuid":"20981789","full_name":"Grokzen/repy","owner":"Grokzen","description":"REPY (REgex PYthon command line tool)","archived":false,"fork":false,"pushed_at":"2014-06-19T00:42:00.000Z","size":128,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T07:33:25.912Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Grokzen.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":"2014-06-18T23:49:10.000Z","updated_at":"2019-08-29T18:00:50.000Z","dependencies_parsed_at":"2023-02-19T23:00:52.392Z","dependency_job_id":null,"html_url":"https://github.com/Grokzen/repy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Grokzen%2Frepy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Grokzen%2Frepy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Grokzen%2Frepy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Grokzen%2Frepy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Grokzen","download_url":"https://codeload.github.com/Grokzen/repy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241774237,"owners_count":20018236,"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-10-11T18:52:25.357Z","updated_at":"2025-12-03T07:05:48.745Z","avatar_url":"https://github.com/Grokzen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REPY (REgex PYthon cli)\n\nThis is a small cli tool that enables testing of regex.\n\n\n\n# Python dependencies\n\n - docopt\u003e=0.6.1\n\n\n\n# Install from source\n\nIt is reccomended to install and run repy inside a virtualenv.\n\nCurrently only installation from source is available. This package do not exit on any pip mirror yet.\n\nFollow these steps to install repy in your enviroment.\n\nClone this git repo to disk\n\n```shell\ngit clone git@github.com:Grokzen/repy.git; cd repy\n```\n\nInstall with\n\n```shell\npython setup.py install\n```\n\nor create a sdist that can be installed with pip\n\n```shell\nmake sdist \u0026\u0026 pip install dist/repy-14.06.tar.gz\n```\n\n\n\n# Usage\n\n```\nrepy-cli -r \"\\\".HN .+\" -t \"\\\"SHN 7\"\n```\n\nOutput\n\n```\n# Search for all matches\n\u003e\u003e\u003e regex = re.compile(self.regex)\n\u003e\u003e\u003e r = regex.search(self.text)\n\u003e\u003e\u003e r is not None\nTrue\n\n# Find what indexes the regex matched\n\u003e\u003e\u003e r.regs\n((0, 6),)\n\n# Test if regex matches text\n\u003e\u003e\u003e m = regex.match(self.text)\n\u003e\u003e\u003e m is not None\nTrue\n\n# List the groups found\n\u003e\u003e\u003e r.groups()\n()\n\n# List the named dictionary objects found\n\u003e\u003e\u003e r.groupdict()\n{}\n\n# Run findall\n\u003e\u003e\u003e f = regex.findall(text)\n\u003e\u003e\u003e f\n['\"SHN 7']\n\n# Run timeit test\n\u003e\u003e\u003e setup = ur'import re; regex =re.compile('\".HN .+');string='\"SHN 7'\n\u003e\u003e\u003e t = timeit.Timer('regex.search(string)',setup)\n\u003e\u003e\u003e t.timeit(10000)\n0.0032029151916503906\n```\n\n\n\n# docopt string\n\nMultiple -v will give different logging levels when running repy. '-vvvvv' will output DEBUG logging messages and '-v' will only output CRITICAL logging messages.\n\n```\nUsage:\n  repy -i [-v ...]\n  repy -r REGEX -t TEXT [-v ...]\n  repy --version [--help]\n\nOptions:\n  -i --interactive         run in interactive mode\n  -r --regex               regex to match text to\n  -t --text                text to match regex against. Only supports single line input.\n  -h --help                show this help\n  -v --verbose             verbose terminal output\n  -V --version             display the version number and exit\n```\n\n\n\n# repy version scheme\n\nStable releases follow the same name scheme ubuntu uses: \u003cyear\u003e.\u003cmonth\u003e.\u003cminor-release\u003e\n\nFor example, a stable release made in March of 2014 will be labled: 14.03\n\nIf a second release is done the same month then it will be labled: 14.03.1\n\n\n\n# Authors\n\n```\nJohan Grok Andersson \u003cGrokzen@gmail.com\u003e\n```\n\n\n\n# Contribution guide\n\nTODO: Write contribution guide\n\n\n\n# License\n\nMIT (See LICENSE file)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrokzen%2Frepy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrokzen%2Frepy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrokzen%2Frepy/lists"}