{"id":16985801,"url":"https://github.com/as400jplpc/zig_decimal","last_synced_at":"2025-03-22T01:27:32.027Z","repository":{"id":281844065,"uuid":"941116977","full_name":"AS400JPLPC/zig_decimal","owner":"AS400JPLPC","description":"decimal 34 digit  ex dcml(8,2) processing decimal numbers","archived":false,"fork":false,"pushed_at":"2025-03-11T12:06:11.000Z","size":6488,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T13:22:29.432Z","etag":null,"topics":["decimals","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/AS400JPLPC.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":"2025-03-01T14:29:42.000Z","updated_at":"2025-03-11T12:06:14.000Z","dependencies_parsed_at":"2025-03-11T13:22:31.931Z","dependency_job_id":"737a7375-206f-4a66-97db-4ff5923b9f2c","html_url":"https://github.com/AS400JPLPC/zig_decimal","commit_stats":null,"previous_names":["as400jplpc/zig_decimal"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AS400JPLPC%2Fzig_decimal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AS400JPLPC%2Fzig_decimal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AS400JPLPC%2Fzig_decimal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AS400JPLPC%2Fzig_decimal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AS400JPLPC","download_url":"https://codeload.github.com/AS400JPLPC/zig_decimal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244892331,"owners_count":20527428,"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":["decimals","zig"],"created_at":"2024-10-14T02:44:12.705Z","updated_at":"2025-03-22T01:27:32.022Z","avatar_url":"https://github.com/AS400JPLPC.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZIG_REGEX\nPCRE2-POSIX  \n  \n  \n\n\nUsing \"regex\" from the new PCRE2-Posix standard\u003cbr\u003e\n\nhttps://github.com/mnemnion/mvzr  new regex form ZIG\n\nexample:\u003cbr\u003e\n\nPay attention to the flag that is incumbent on you.\u003cbr\u003e\n/i ignore case\u003cbr\u003e\n/g global \u003cbr\u003e\n/m multiline \u003cbr\u003e\n\n\n```\nconst std = @import(\"std\");\n\n// tools regex\nconst reg = @import(\"match\");\n\nconst allocatorPrint = std.heap.page_allocator;\n\npub fn main() !void {\n\nconst stdin = std.io.getStdIn().reader();\nvar buf : [3]u8 = undefined;\nbuf = [_]u8{0} ** 3;\n\n  std.debug.print(\"Macth abc {} \\r\\n\",.{reg.isMatch(\"p1\",\"^[A-Z]{1,1}[a-zA-Z0-9]{0,}$/g\")}) ;\n\n\n  std.debug.print(\"Macth abc {} \\r\\n\",.{reg.isMatch(\"p1\",\"^[a-zA-Z]{1,1}[a-zA-Z0-9]{0,}$\")}) ;\n\n  std.debug.print(\"Macth digit {} \\r\\n\",.{reg.isMatch(\n  \"423\",\n  \"^[1-9]{1,1}?[0-9]{0,}$\")}) ;\n\n  std.debug.print(\"Macth tel fr{} \\r\\n\",.{reg.isMatch(\n  \"+(33)6.12.34.56.78\",\n  \"^[+]{1,1}[(]{0,1}[0-9]{1,3}[)]([0-9]{1,3}){1,1}([-. ]?[0-9]{2,3}){2,4}$\")}) ;\n\n  std.debug.print(\"Macth tel us{} \\r\\n\",.{reg.isMatch(\n  \"+(001)456.123.789\",\n  \"^[+]{1,1}[(]([0-9]{3,3})[)]([-. ]?[0-9]{3}){2,4}$\")}) ;\n  \n  std.debug.print(\"Macth date fr{} \\r\\n\",.{reg.isMatch(\n  \"12/10/1951\",\n  \"^(0[1-9]|[12][0-9]|3[01])[\\\\/](0[1-9]|1[012])[\\\\/][0-9]{4,4}$\")});\n\n\n  std.debug.print(\"Macth date us{} \\r\\n\",.{reg.isMatch(\n  \"10/12/1951\",\n  \"^(0[1-9]|1[012])[\\\\/](0[1-9]|[12][0-9]|3[01])[\\\\/][0-9]{4,4}$\")});\n\n  std.debug.print(\"Macth date iso{} \\r\\n\",.{reg.isMatch(\n  \"2003-02-25\",\n  \"^([0-9]{4,4})[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$\")});\n\n\n  // https://stackoverflow.com/questions/201323/how-can-i-validate-an-email-address-using-a-regular-expression\n  // chapitre RFC 6532 updates 5322 to allow and include full, clean UTF-8.\n\n  std.debug.print(\"Macth Mail{} \\r\\n\",.{reg.isMatch(\n  \"myname.myfirstname@gmail.com\",\n  \"^([-!#-\\'*+\\\\/-9=?A-Z^-~]{1,64}(\\\\.[-!#-\\'*+\\\\/-9=?A-Z^-~]{1,64})*|\\\"([]!#-[^-~ \\t]|(\\\\[\\t -~]))+\\\")@[0-9A-Za-z]([0-9A-Za-z-]{0,61}[0-9A-Za-z])?(\\\\.[0-9A-Za-z]([0-9A-Za-z-]{0,61}[0-9A-Za-z])?)+$\")});\n\n  //oreilly\n  std.debug.print(\"Macth Mail{} \\r\\n\",.{reg.isMatch(\n  \"myname.myfirstname@gmail.com\",\n  \"^[A-Z0-9_!#$%\u0026'*+/=?`{|}~^.-]+@[A-Z0-9.-]+$\")});\n\n\n\n\n  var width :usize = 5;\n  // unsigned digit\n  std.debug.print(\"Macth digit unsigned{} \\r\\n\",.{reg.isMatch(\n  \"123\",\n  std.fmt.allocPrint(allocatorPrint,\"^[0-9]{s}{d}{s}$\",.{\"{1,\",width,\"}\"},) catch unreachable)});\n\n  // unsigned digit\n  std.debug.print(\"Macth digit {} \\r\\n\",.{reg.isMatch(\n  \"+12345\",\n  std.fmt.allocPrint(allocatorPrint,\"^[+-][0-9]{s}{d}{s}$\",.{\"{1,\",width,\"}\"},) catch unreachable)});\n\n  \n  // decimal unsigned  scal = 0\n  std.debug.print(\"Macth decimal unsigned  scal = 0 {} \\r\\n\",.{reg.isMatch(\n  \"12345\",\n  std.fmt.allocPrint(allocatorPrint,\"^[0-9]{s}1,{d}{s}$\",.{\"{\",width,\"}\"},) catch unreachable)});\n\n  var scal :usize = 2;\n  // decimal unsigned  scal \u003e 0\n  std.debug.print(\"Macth decimal unsigned  scal \u003e 0 {} \\r\\n\",.{reg.isMatch(\n  \"12345.02\",\n  std.fmt.allocPrint(allocatorPrint,\n  \"^[0-9]{s}1,{d}{s}[.][0-9]{s}{d}{s}$\",.{\"{\",width,\"}\",\"{\",scal,\"}\"}\n  ) catch unreachable)});\n\n  _= try stdin.readUntilDelimiterOrEof(buf[0..], '\\n');\n  \n  // decimal signed   scal = 0\n  std.debug.print(\"Macth decimal signed  scal = 0 {} \\r\\n\",.{reg.isMatch(\n  \"+12345\",\n  std.fmt.allocPrint(allocatorPrint,\"^[+-][0-9]{s}1,{d}{s}$\",.{\"{\",width,\"}\"},) catch unreachable)});\n\n\n  // decimal unsigned  scal \u003e 0\n  std.debug.print(\"Macth decimal signed  scal \u003e 0 {} \\r\\n\",.{reg.isMatch(\n  \"+12345.02\",\n  std.fmt.allocPrint(allocatorPrint,\n  \"^[+-][0-9]{s}1,{d}{s}[.][0-9]{s}{d}{s}$\",.{\"{\",width,\"}\",\"{\",scal,\"}\"}\n  ) catch unreachable)});\n\n  var i: usize = 0 ;\n  while(i \u003c 5000) : ( i += 1 ) {\n  _=reg.isMatch(\n  \"1951-10-12\",\n  \"^([0-9]{4,4})[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$\");\n  }\n\n\nbuf = [_]u8{0} ** 3;\n  _= try stdin.readUntilDelimiterOrEof(buf[0..], '\\n');\n}\n\n```\n\u003cBR /\u003e\n\n*   •upgrade 2024-03-23.\u003cBR /\u003e \n\n*   •upgrade 2024-06-29.\u003cBR /\u003e \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026larr;\u0026nbsp;zig version    0.13.0\u003cBR /\u003e\n\n\n*   •upgrade 2024-07-01.\u003cBR /\u003e \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026larr;\u0026nbsp;Test Fluent and PCRE \"C\"   Zregex\u003cBR /\u003e \n\n\n*   •upgrade 2024-07-22.\u003cBR /\u003e \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026larr;\u0026nbsp;Test MVZR and PCRE \"C\"   Zregex\u003cBR /\u003e \n\n\n*   •upgrade 2025-03-12.\u003cBR /\u003e \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026larr;\u0026nbsp;zig version    0.14.0\u003cBR /\u003e\n\n\n*   •upgrade 2025-03-13.\u003cBR /\u003e \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026larr;\u0026nbsp; update normalise and edit-code\u003cBR /\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fas400jplpc%2Fzig_decimal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fas400jplpc%2Fzig_decimal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fas400jplpc%2Fzig_decimal/lists"}