{"id":13394738,"url":"https://github.com/VerbalExpressions/JSVerbalExpressions","last_synced_at":"2025-03-13T20:31:40.245Z","repository":{"id":9607095,"uuid":"11530283","full_name":"VerbalExpressions/JSVerbalExpressions","owner":"VerbalExpressions","description":"JavaScript Regular expressions made easy","archived":false,"fork":false,"pushed_at":"2024-05-16T21:59:30.000Z","size":3253,"stargazers_count":12167,"open_issues_count":28,"forks_count":511,"subscribers_count":260,"default_branch":"master","last_synced_at":"2024-05-16T22:48:52.730Z","etag":null,"topics":["javascript-regular-expressions","verbalexpressions"],"latest_commit_sha":null,"homepage":"http://verbalexpressions.github.io/JSVerbalExpressions/","language":"JavaScript","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/VerbalExpressions.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":"2013-07-19T14:59:46.000Z","updated_at":"2024-06-18T11:22:41.471Z","dependencies_parsed_at":"2023-09-25T03:38:54.262Z","dependency_job_id":"53d5d5a1-b4b6-437d-b624-62451684964e","html_url":"https://github.com/VerbalExpressions/JSVerbalExpressions","commit_stats":{"total_commits":460,"total_committers":52,"mean_commits":8.846153846153847,"dds":0.6934782608695652,"last_synced_commit":"deb7333f4aa89b0f4335c3b5826d9c4563c8d5d9"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerbalExpressions%2FJSVerbalExpressions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerbalExpressions%2FJSVerbalExpressions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerbalExpressions%2FJSVerbalExpressions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerbalExpressions%2FJSVerbalExpressions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VerbalExpressions","download_url":"https://codeload.github.com/VerbalExpressions/JSVerbalExpressions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243478187,"owners_count":20297210,"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":["javascript-regular-expressions","verbalexpressions"],"created_at":"2024-07-30T17:01:29.969Z","updated_at":"2025-03-13T20:31:40.212Z","avatar_url":"https://github.com/VerbalExpressions.png","language":"JavaScript","readme":"# VerbalExpressions\n\n[![Build Status](https://travis-ci.org/VerbalExpressions/JSVerbalExpressions.svg)](https://travis-ci.org/VerbalExpressions/JSVerbalExpressions)\n[![Latest Version](https://img.shields.io/npm/v/verbal-expressions.svg)](https://www.npmjs.com/package/verbal-expressions)\n[![jsDelivr](https://img.shields.io/badge/dynamic/json.svg?label=jsDelivr\u0026url=https%3A%2F%2Fdata.jsdelivr.com%2Fv1%2Fpackage%2Fnpm%2Fverbal-expressions\u0026query=%24..tags.latest\u0026colorB=blue\u0026prefix=v)](https://www.jsdelivr.com/package/npm/verbal-expressions)\n[![License](https://img.shields.io/github/license/VerbalExpressions/JSVerbalExpressions.svg)](LICENSE)\n\n## JavaScript Regular Expressions made easy\n\nVerbalExpressions is a JavaScript library that helps construct difficult regular expressions.\n\n## How to get started\n\n### In the browser\n\n```html\n\u003cscript src=\"VerbalExpressions.js\"\u003e\u003c/script\u003e\n```\n\nOr use the [jsDelivr CDN](https://www.jsdelivr.com/package/npm/verbal-expressions).\n\n### On the server (node.js)\n\nInstall:\n\n```sh\nnpm install verbal-expressions\n```\n\nRequire:\n\n```js\nconst VerEx = require('verbal-expressions');\n```\n\nOr use ES6's `import`:\n\n```js\nimport VerEx from 'verbal-expressions';\n```\n\n## Running tests\n\n```sh\nnpm test\n```\n\n(or)\n\n```sh\nnpm run test:verbose\n```\n\n## Creating a minified version\n\n```sh\nnpm run build\n```\n\nThis will run [Babel](https://babeljs.io) on `VerbalExpressions.js` and output the result to `dist/verbalexpressions.js`. A minified version of the same will also be written to `dist/verbalexpressions.min.js`.\n\nA source map will also be created in `dist`, so you can use the original \"un-babelified\", unminified source file for debugging purposes.\n\n## Building the docs/ folder\n\nThe `docs/` folder uses Jekyll for building the static HTML and is hosted at\ngh-pages.\n\nTo install the Ruby dependencies, run:\n\n```\ncd docs/\nbundle install\n```\n\nThis installs all needed Ruby dependencies locally\n\nAfter you've installed dependencies, you can run:\n\n```\nbundle exec jekyll build\n```\n\nThis builds all static files to `docs/_site/` folder.\n\nIf you want to develop the files locally, you can run:\n\n```\nbundle exec jekyll serve\n```\n\nThis starts a local development web server and starts watching your files for\nchanges.\n\n## API documentation\n\nYou can find the API documentation at [verbalexpressions.github.io/JSVerbalExpressions](https://verbalexpressions.github.io/JSVerbalExpressions). You can find the source code for the docs in [`docs`](docs/).\n\n## Examples\n\nHere are some simple examples to give an idea of how VerbalExpressions works:\n\n### Testing if we have a valid URL\n\n```js\n// Create an example of how to test for correctly formed URLs\nconst tester = VerEx()\n    .startOfLine()\n    .then('http')\n    .maybe('s')\n    .then('://')\n    .maybe('www.')\n    .anythingBut(' ')\n    .endOfLine();\n\n// Create an example URL\nconst testMe = 'https://www.google.com';\n\n// Use RegExp object's native test() function\nif (tester.test(testMe)) {\n    alert('We have a correct URL'); // This output will fire\n} else {\n    alert('The URL is incorrect');\n}\n\nconsole.log(tester); // Outputs the actual expression used: /^(http)(s)?(\\:\\/\\/)(www\\.)?([^\\ ]*)$/\n```\n\n### Replacing strings\n\n```js\n// Create a test string\nconst replaceMe = 'Replace bird with a duck';\n\n// Create an expression that seeks for word \"bird\"\nconst expression = VerEx().find('bird');\n\n// Execute the expression like a normal RegExp object\nconst result = expression.replace(replaceMe, 'duck');\n\n// Outputs \"Replace duck with a duck\"\nalert(result);\n```\n\n### Shorthand for string replace\n\n```js\nconst result = VerEx().find('red').replace('We have a red house', 'blue');\n\n// Outputs \"We have a blue house\"\nalert(result);\n```\n\n## Contributions\n\nPull requests are warmly welcome!\n\nClone the repo and fork:\n\n```sh\ngit clone https://github.com/VerbalExpressions/JSVerbalExpressions.git\n```\n\n### Style guide\n\nThe [Airbnb](https://github.com/airbnb/javascript) style guide is loosely used as a basis for creating clean and readable JavaScript code. Check [`.eslintrc`](.eslintrc).\n\nCheck out these slide decks for handy Github \u0026 git tips:\n\n- [Git and Github Secrets](https://zachholman.com/talk/git-github-secrets/)\n- [More Git and Github Secrets](https://zachholman.com/talk/more-git-and-github-secrets/)\n\n## Tools\n\n- \u003chttps://verbalregex.com\u003e - it's a wrapper of JSVerbalExpressions; users can write down the code and compile to regex\n- \u003chttps://jsbin.com/metukuzowi/edit?js,console\u003e - JSBin Playground\n\n## Other Implementations\n\nYou can see an up to date list of all ports on [VerbalExpressions.github.io](https://VerbalExpressions.github.io).\n\n- [Ruby](https://github.com/ryan-endacott/verbal_expressions)\n- [C#](https://github.com/VerbalExpressions/CSharpVerbalExpressions)\n- [Python](https://github.com/VerbalExpressions/PythonVerbalExpressions)\n- [Java](https://github.com/VerbalExpressions/JavaVerbalExpressions)\n- [Groovy](https://github.com/VerbalExpressions/GroovyVerbalExpressions)\n- [PHP](https://github.com/VerbalExpressions/PHPVerbalExpressions)\n- [Haskell](https://github.com/VerbalExpressions/HaskellVerbalExpressions)\n- [Haxe](https://github.com/VerbalExpressions/HaxeVerbalExpressions)\n- [C++](https://github.com/VerbalExpressions/CppVerbalExpressions)\n- [Objective-C](https://github.com/VerbalExpressions/ObjectiveCVerbalExpressions)\n- [Perl](https://github.com/VerbalExpressions/PerlVerbalExpressions)\n- [Swift](https://github.com/VerbalExpressions/SwiftVerbalExpressions)\n\nIf you would like to contribute another port (which would be awesome!), please [open an issue](https://github.com/VerbalExpressions/implementation/issues/new) specifying the language in the [VerbalExpressions/implementation repo](https://github.com/VerbalExpressions/implementation/issues). Please don't open PRs for other languages against this repo.\n\n### Similar projects\n\nHere's a list of other similar projects that implement regular expression\nbuilders:\n\n- https://github.com/MaxArt2501/re-build\n- https://github.com/mathiasbynens/regenerate","funding_links":[],"categories":["JavaScript","Reference","Web and NodeJS","others","Libraries","Regular Expression","JavaScript Libs"],"sub_categories":["Regular Expressions","Torrent","Misc"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVerbalExpressions%2FJSVerbalExpressions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVerbalExpressions%2FJSVerbalExpressions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVerbalExpressions%2FJSVerbalExpressions/lists"}