{"id":16356926,"url":"https://github.com/previousdeveloper/angular-regex","last_synced_at":"2025-10-26T04:30:16.411Z","repository":{"id":58216262,"uuid":"49158280","full_name":"previousdeveloper/angular-regex","owner":"previousdeveloper","description":"Angular regular expressions service","archived":false,"fork":false,"pushed_at":"2016-01-10T08:55:19.000Z","size":16,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T14:16:31.357Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/previousdeveloper.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":"2016-01-06T20:00:35.000Z","updated_at":"2023-02-02T20:34:48.000Z","dependencies_parsed_at":"2022-08-30T16:10:37.782Z","dependency_job_id":null,"html_url":"https://github.com/previousdeveloper/angular-regex","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/previousdeveloper%2Fangular-regex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/previousdeveloper%2Fangular-regex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/previousdeveloper%2Fangular-regex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/previousdeveloper%2Fangular-regex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/previousdeveloper","download_url":"https://codeload.github.com/previousdeveloper/angular-regex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238207667,"owners_count":19434095,"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-11T01:44:34.225Z","updated_at":"2025-10-26T04:30:15.792Z","avatar_url":"https://github.com/previousdeveloper.png","language":"JavaScript","readme":"# angular-regex\nVerbalExpressions is a Angular library that helps to construct difficult regular expressions.\n\n\n\n\n[![Build Status](https://travis-ci.org/previousdeveloper/angular-regex.svg?branch=master)](https://travis-ci.org/previousdeveloper/angular-regex) [![Coverage Status](https://coveralls.io/repos/previousdeveloper/angular-regex/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/previousdeveloper/angular-regex?branch=master)\n\n\n## Install\n\nInstall with Bower or download the the files directly from the dist folder in the repo.\n\n```bash\nbower install angular-regex\n```\n\nAdd `dist/angular-regex.service.min.js`  index.html.\n\nAdd `regex` as a module dependency for your module.\n\nThen inject and use the `regexService` service.\n\n\n## Examples\n\nHere's a couple of simple examples to give an idea of how VerbalExpressions works:\n\n### Testing if we have a valid URL\n\n```javascript\n// Create an example of how to test for correctly formed URLs\nfunction myController($scope,regexService){  // \u003c-- Inject regexService\n\nvar tester = regexService.ex()\n    .startOfLine()\n    .then('http')\n    .maybe('s')\n    .then('://')\n    .maybe('www.')\n    .anythingBut(' ')\n    .endOfLine();\n\n// Create an example URL\nvar 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```javascript\n// Create a test string\nvar replaceMe = 'Replace bird with a duck';\n\n// Create an expression that seeks for word \"bird\"\nvar expression = regexService.ex().find('bird');\n\n// Execute the expression like a normal RegExp object\nvar result = expression.replace(replaceMe, 'duck');\n\n// Outputs \"Replace duck with a duck\"\nalert(result);\n```\n\n### Shorthand for string replace:\n\n```javascript\nvar result = regexService.ex().find('red').replace('We have a red house', 'blue');\n\n// Outputs \"We have a blue house\"\nalert(result);\n```\n\n## API documentation\n\nYou can find the API documentation at the [wiki pages](https://github.com/VerbalExpressions/JSVerbalExpressions/wiki).\n\n## A little word for a big help\nI'd like to promote a special thank-you to [Ben Nadel][ben-nadel] for his [great article about extending native JS objects][extending]\n\n## Contributions\nClone the repo and fork:\n`git clone https://github.com/jehna/VerbalExpressions.git`.\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.\n\nPull requests are warmly welcome!\n\nCheck out these slide decks for handy Github \u0026 git tips:\n- [Git and Github Secrets](http://zachholman.com/talk/git-github-secrets/)\n- [More Git and Github Secrets](http://zachholman.com/talk/more-git-and-github-secrets/)\n\n[ben-nadel]:http://www.bennadel.com/\n[extending]:http://www.bennadel.com/blog/2292-extending-javascript-arrays-while-keeping-native-bracket-notation-functionality.htm\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreviousdeveloper%2Fangular-regex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreviousdeveloper%2Fangular-regex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreviousdeveloper%2Fangular-regex/lists"}