{"id":22354304,"url":"https://github.com/jonmagic/sharing-regular-expressions-between-languages","last_synced_at":"2025-07-23T06:35:41.078Z","repository":{"id":66375256,"uuid":"593742675","full_name":"jonmagic/sharing-regular-expressions-between-languages","owner":"jonmagic","description":"Experiments showing how to serialize a regular expression in one language and then deserialize it to use in another language","archived":false,"fork":false,"pushed_at":"2023-01-26T23:12:44.000Z","size":151,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T12:46:33.578Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonmagic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-01-26T18:33:59.000Z","updated_at":"2023-11-29T04:08:20.000Z","dependencies_parsed_at":"2023-02-22T02:30:21.491Z","dependency_job_id":null,"html_url":"https://github.com/jonmagic/sharing-regular-expressions-between-languages","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonmagic/sharing-regular-expressions-between-languages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonmagic%2Fsharing-regular-expressions-between-languages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonmagic%2Fsharing-regular-expressions-between-languages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonmagic%2Fsharing-regular-expressions-between-languages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonmagic%2Fsharing-regular-expressions-between-languages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonmagic","download_url":"https://codeload.github.com/jonmagic/sharing-regular-expressions-between-languages/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonmagic%2Fsharing-regular-expressions-between-languages/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266631582,"owners_count":23959420,"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-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":[],"created_at":"2024-12-04T13:12:15.153Z","updated_at":"2025-07-23T06:35:41.058Z","avatar_url":"https://github.com/jonmagic.png","language":"Ruby","readme":"# Sharing regular expressions between languages\n\nThe first goal of this project is to show how to serialize a regular expression object in Javascript and then deserialize and use it in Ruby.\n\n```bash\nsharing-regular-expressions-between-languages on  main via ⬢ v16.14.2 via 💎 v3.2.0\n➜ node experiment_1.js\n[\n  '1. one',\n  '1',\n  'one',\n  index: 0,\n  input: '1. one\\n2. two\\n3. three',\n  groups: undefined\n]\n[ 'jonmagic@gmail.com', 'bob@acme.com' ]\n{\n  stringPattern: 'hello world',\n  simpleRegex: '/(\\\\d+)\\\\.\\\\s(\\\\w+)/',\n  complexRegex: '/(?:[a-z0-9!#$%\u0026\\'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%\u0026\\'*+/=?^_`{|}~-]+)*|\"(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21\\\\x23-\\\\x5b\\\\x5d-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21-\\\\x5a\\\\x53-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])+)\\\\])/gi',\n  content: [\n    'we live in this hello world kind of place',\n    '1. one\\n2. two\\n3. three',\n    'jonmagic@gmail.com\\nfoo\\nbob@acme.com'\n  ]\n}\nstringPattern: hello world\nsimpleRegex: /(\\d+)\\.\\s(\\w+)/\ncomplexRegex: \u003e-\n  /(?:[a-z0-9!#$%\u0026'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%\u0026'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])/gi\ncontent:\n  - we live in this hello world kind of place\n  - |-\n    1. one\n    2. two\n    3. three\n  - |-\n    jonmagic@gmail.com\n    foo\n    bob@acme.com\n\n\nsharing-regular-expressions-between-languages on  main via ⬢ v16.14.2 via 💎 v3.2.0\n➜ ruby experiment_1.rb\nPattern: {:type=\u003e:simple, :pattern=\u003e\"hello world\", :flags=\u003e[], :global_search=\u003efalse}\nContent: \"we live in this hello world kind of place\"\nMatches: hello world\nContent: \"1. one\\n2. two\\n3. three\"\nMatches:\nContent: \"jonmagic@gmail.com\\nfoo\\nbob@acme.com\"\nMatches:\n\nPattern: {:type=\u003e:simple, :pattern=\u003e/(\\d+)\\.\\s(\\w+)/, :flags=\u003e[], :global_search=\u003efalse}\nContent: \"we live in this hello world kind of place\"\nMatches:\nContent: \"1. one\\n2. two\\n3. three\"\nMatches: 1. one\nContent: \"jonmagic@gmail.com\\nfoo\\nbob@acme.com\"\nMatches:\n\nPattern: {:type=\u003e:simple, :pattern=\u003e/(?:[a-z0-9!#$%\u0026'*+\\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%\u0026'*+\\/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])/i, :flags=\u003e[\"g\", \"i\"], :global_search=\u003etrue}\nContent: \"we live in this hello world kind of place\"\nMatches: []\nContent: \"1. one\\n2. two\\n3. three\"\nMatches: []\nContent: \"jonmagic@gmail.com\\nfoo\\nbob@acme.com\"\nMatches: [\"jonmagic@gmail.com\", \"bob@acme.com\"]\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonmagic%2Fsharing-regular-expressions-between-languages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonmagic%2Fsharing-regular-expressions-between-languages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonmagic%2Fsharing-regular-expressions-between-languages/lists"}