{"id":27541798,"url":"https://github.com/branneman/jsgrep-cli","last_synced_at":"2025-04-18T23:59:52.401Z","repository":{"id":57156047,"uuid":"133782615","full_name":"branneman/jsgrep-cli","owner":"branneman","description":"An alternative to grep which uses JavaScript's Regex, supports a match and a match-and-replace","archived":false,"fork":false,"pushed_at":"2018-05-23T11:41:17.000Z","size":40,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-05T20:46:32.983Z","etag":null,"topics":["cli","grep","javascript","js","pcre","regex","tool"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/branneman.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-17T08:25:14.000Z","updated_at":"2018-10-09T12:36:28.000Z","dependencies_parsed_at":"2022-08-28T05:50:26.448Z","dependency_job_id":null,"html_url":"https://github.com/branneman/jsgrep-cli","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/branneman%2Fjsgrep-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/branneman%2Fjsgrep-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/branneman%2Fjsgrep-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/branneman%2Fjsgrep-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/branneman","download_url":"https://codeload.github.com/branneman/jsgrep-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249565390,"owners_count":21292439,"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":["cli","grep","javascript","js","pcre","regex","tool"],"created_at":"2025-04-18T23:59:51.778Z","updated_at":"2025-04-18T23:59:52.379Z","avatar_url":"https://github.com/branneman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsgrep-cli\n\n[![Build Status](https://travis-ci.org/branneman/jsgrep-cli.svg?branch=master)](https://travis-ci.org/branneman/jsgrep-cli)\n[![Known Vulnerabilities](https://snyk.io/test/github/branneman/jsgrep-cli/badge.svg)](https://snyk.io/test/github/branneman/jsgrep-cli)\n\nAn alternative to grep which uses JavaScript's Regex, supports a match and a match-and-replace\n\n## Installation\n\n```\nnpm i jsgrep-cli -g\n```\n\n## Example\n\nMatch input from stdin, return any matching line:\n\n```\nls -al ~ | jsgrep \" \\.[a-z]+rc$\"\n```\n\nMatch and replace lines from stdin. Capturing groups are exposed as `$1`, `$2`... variables (1-indexed), and must probably be escaped to prevent being interpreted by your shell:\n\n```\nls -al ~ | jsgrep \".+ (\\.[a-z]+rc$)\" \"\\$1\"\n```\n\nPassing flags (default `i`):\n\n```\nls -al ~ | jsgrep \" \\.[a-z]+rc$\" --flags iu\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbranneman%2Fjsgrep-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbranneman%2Fjsgrep-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbranneman%2Fjsgrep-cli/lists"}