{"id":22495361,"url":"https://github.com/kaashyapan/regx","last_synced_at":"2025-09-10T11:37:39.732Z","repository":{"id":65266178,"uuid":"589133500","full_name":"kaashyapan/Regx","owner":"kaashyapan","description":"Write regex using F# computation expressions","archived":false,"fork":false,"pushed_at":"2023-12-05T09:59:00.000Z","size":147,"stargazers_count":30,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-18T21:53:33.085Z","etag":null,"topics":["ce","computation","expression","fsharp","regex"],"latest_commit_sha":null,"homepage":"","language":"F#","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/kaashyapan.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-01-15T06:56:25.000Z","updated_at":"2025-06-03T17:35:17.000Z","dependencies_parsed_at":"2023-12-05T10:51:19.461Z","dependency_job_id":"324070d0-cad8-432e-95d1-ce6c2010a595","html_url":"https://github.com/kaashyapan/Regx","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":0.09090909090909094,"last_synced_commit":"2626ea818d68c749a193bcc670a9b606a7e89637"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kaashyapan/Regx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaashyapan%2FRegx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaashyapan%2FRegx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaashyapan%2FRegx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaashyapan%2FRegx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaashyapan","download_url":"https://codeload.github.com/kaashyapan/Regx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaashyapan%2FRegx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274455707,"owners_count":25288557,"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","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ce","computation","expression","fsharp","regex"],"created_at":"2024-12-06T19:27:14.263Z","updated_at":"2025-09-10T11:37:39.687Z","avatar_url":"https://github.com/kaashyapan.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Regx - Declarative Regex for humans\n## F# DSL for Regex [nuget](https://www.nuget.org/packages/Regx)\n```fsharp\n#r \"nuget: Regx\"\nopen Regx\n\n// Compose a regex for url \n\nlet protocol =\n    group {\n        capture {\n            oneOf {\n                verbatimString \"http\"\n                verbatimString \"https\"\n            }\n        }\n        verbatimString \"://\"\n    }\n\nlet subdomain =\n    group {\n        oneOrMore { wordChar }\n        verbatimString \".\"\n    }\n\nlet domain =\n    group {\n        captureAs \"domain\" { occursBetween 2 256 { wordChar } }\n        verbatimString \".\"\n    }\n\nlet ending = group { occursBetween 1 8 { wordChar } }\n\nlet port =\n    group {\n        verbatimString \":\"\n        occursMoreThan 2 { digit }\n    }\n\nlet path =\n    zeroOrMore {\n        capture {\n            verbatimString \"/\"\n            oneOrMore { wordChar }\n        }\n    }\n\nlet pattern =\n    regex {\n        mayHave { protocol }\n        mayHave { subdomain }\n        domain\n        ending\n        mayHave { port }\n        path\n    }\n    |\u003e Regx.make\n\n// Generates - (?:(http|https):\\/\\/)?(?:\\w+\\.)?(?:(?\u003cdomain\u003e\\w{2,256})\\.)(?:\\w{1,8})(?::\\d{2,})?(\\/\\w+)*\n ```\n\n\nMore examples in tests\n\n\n|DSL  |What it means  |\n|--|--|\n| `any` |Dot - Matches any character except linebreaks. Equivalent to [^\\n\\r].  |\n| `anyChar` |Match any - A character set that can be used to match any character, including line breaks, without the dotall flag. Represents [\\s\\S]  |\n| `wordChar` |Matches any word character (alphanumeric \u0026 underscore). Only matches low-ascii characters (no accented or non-roman characters). Equivalent to [A-Za-z0-9_]  |\n| `notWordChar` |Matches any character that is not a word character (alphanumeric \u0026 underscore). Equivalent to [^A-Za-z0-9_]  |\n| `digit` |Matches any digit character (0-9). Equivalent to [0-9].  |\n| `notDigit` |Matches any character that is not a digit character (0-9). Equivalent to [^0-9].  |\n| `whiteSpace` |Matches any whitespace character (spaces, tabs, line breaks).  |\n| `notWhiteSpace` |Matches any character that is not a whitespace character (spaces, tabs, line breaks).  |\n| `charIn` |Match any character in the set  |\n| `charNotIn` |Negate character set - Match any character that is not in the set.  |\n| `inRange` |Matches a character having a character code between the two specified characters inclusive. |\n| `inList` |Matches characters in list|\n| `beginsWith` |Enclosed expression occurs in the beginning of the fragment |\n| `endsWith` |Enclosed expression occurs in the end of the fragment |\n| `beginsWithString` |Enclosed expression occurs in the beginning of the fragment  |\n| `endsWithString` |Enclosed expression occurs in the end of the fragment  |\n|`wordBoundary` |Matches a word boundary position between a word character and non-word character or position (start / end of string).|\n|`notWordBoundary`|Matches any position that is not a word boundary. This matches a position, not a character.|\n|`mayHave`|Matches 0 or 1 of the enclosed fragment, effectively making it optional|\n|`fewest`|Makes the enclosed fragment lazy, causing it to match as few characters as possible.|\n|`longest`|Makes the enclosed fragment Greedily, causing it to match as many characters as possible.|\n|`oneOf`|Acts like a boolean OR. Matches the expression before or after the|\n|`oneOrMore`|Matches 1 or more of the enclosed fragment|\n|`zeroOrMore`|Matches 0 or more of the enclosed fragment|\n|`occurs`|Matches the exact quantity of the enclosed token.|\n|`occursMoreThan`|Matches the specified quantity or more of the enclosed token.|\n|`occursBetween`|Matches a quantity of the enclosed toke in the specified range.|\n|`between`|Match between an open and a closing tag- for balanced captures|\n|`capture`| Grouped capture|\n|`captureAs`|Named group capture|\n|`group`|Non-capturing group|\n|`refGroupNo`|\\1 - Numeric reference - Matches the results of a capture group.|\n|`refGroupName`|\\k\u003cname\u003e - Group name reference - Matches the results of a named capture group.|\n|`positiveLookAhead`| \\d(?=px) - Matches a group after the main expression without including it in the result.|\n|`negativeLookAhead`| \\d(?!px) - Specifies a group that can not match after the main expression (if it matches, the result is discarded).|\n|`positiveLookBehind`| (?\u003c=ABC) - Matches a group before the main expression without including it in the result.|\n|`negativeLookBehind`| (?\u003c!ABC) - Specifies a group that can not match before the main expression (if it matches, the result is discarded).|\n|`verbatimString`|Unescaped string literal|\n|`tab`||\n|`lineFeed`||\n|`verticalTab`||\n|`formFeed`||\n|`carriageReturn`||\n|`nullCharacter`||\n\n### Additional custom builders\n\n|DSL  |What it means  |\n|--|--|\n| `word` | Represents an actual word. Equivalent to /(?:\\w+)/  |\n| `email` | English email |\n| `url` | English url |\n| `guid` | GUID |\n| `uuid` | UUID |\n| `ip4Address` | IPv4 |\n| `ip6Address` | IPv6 |\n| `ipAddress` | IPV4 or IPv6 (does not support embedded IPv4 address)|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaashyapan%2Fregx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaashyapan%2Fregx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaashyapan%2Fregx/lists"}