{"id":27637861,"url":"https://github.com/jlobos/rut-regex","last_synced_at":"2025-06-29T08:34:05.815Z","repository":{"id":54414230,"uuid":"99728159","full_name":"jlobos/rut-regex","owner":"jlobos","description":"Regular expression for matching Chile RUT's","archived":false,"fork":false,"pushed_at":"2021-02-19T11:38:24.000Z","size":39,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-20T00:42:23.571Z","etag":null,"topics":["chile","regex","rut"],"latest_commit_sha":null,"homepage":"https://npmjs.com/rut-regex","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/jlobos.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-08-08T19:20:56.000Z","updated_at":"2024-03-24T05:04:30.000Z","dependencies_parsed_at":"2022-08-13T15:00:24.594Z","dependency_job_id":null,"html_url":"https://github.com/jlobos/rut-regex","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlobos%2Frut-regex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlobos%2Frut-regex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlobos%2Frut-regex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlobos%2Frut-regex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jlobos","download_url":"https://codeload.github.com/jlobos/rut-regex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250518234,"owners_count":21443924,"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":["chile","regex","rut"],"created_at":"2025-04-23T21:33:01.778Z","updated_at":"2025-04-23T21:33:02.244Z","avatar_url":"https://github.com/jlobos.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rut-regex\n\n\u003e Regular expression for matching Chile RUT's\n\n## Install\n\n```bash\n$ npm install --save rut-regex\n```\n\n## Usage\n\n```js\nconst rutRegex = require('rut-regex')\n\nrutRegex().test('Felipito 8.714.763-0')\n// true\n\nrutRegex().test('8.714.763-0 Felipito')\n// true\n\nrutRegex({exact: true}).test('Felipito 8.714.763-0')\n// false\n\nrutRegex({exact: true}).test('8.714.763-0')\n// true\n\nrutRegex({exact: true, dot: false}).test('8714763-0')\n// true\n\nrutRegex({exact: true, dot: false, hyphen: false}).test('87147630')\n// true\n\n'Ganadores 8.714.763-0 18.972.631-7 :tada:'.match(rutRegex())\n// [ '8.714.763-0', '18.972.631-7' ]\n```\n\n## API\n\n### rutRegex(options)\n\nReturns a regex for matching Chile RUT's.\n\n#### options\n\nType: `Object`\n\n##### exact\n\nType: `boolean`\u003cbr\u003e\nDefault: `false`\n\nOnly match an exact string. Useful with `RegExp#test` to check if a string is a RUT.\n\n##### dot\n\nType: `boolean`\u003cbr\u003e\nDefault: `true`\n\nDot (.) in RUT.\n\n##### hyphen\n\nType: `boolean`\u003cbr\u003e\nDefault: `true`\n\nHyphen (-) in RUT.\n\n## Related\n\n- [rut.js](https://github.com/jlobos/rut.js) - Sencilla y pequeña librería para validar y dar formato al RUT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlobos%2Frut-regex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjlobos%2Frut-regex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlobos%2Frut-regex/lists"}