{"id":20719153,"url":"https://github.com/tom-weatherhead/http-get-regex-capture","last_synced_at":"2026-04-22T06:39:14.953Z","repository":{"id":57268169,"uuid":"104952904","full_name":"tom-weatherhead/http-get-regex-capture","owner":"tom-weatherhead","description":"Obtain text via an HTTP GET request, and then capture pieces of the text with regular expressions.","archived":false,"fork":false,"pushed_at":"2018-08-29T18:40:59.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-18T17:32:06.689Z","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/tom-weatherhead.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-09-27T00:42:38.000Z","updated_at":"2018-08-29T18:41:00.000Z","dependencies_parsed_at":"2022-09-02T05:41:07.248Z","dependency_job_id":null,"html_url":"https://github.com/tom-weatherhead/http-get-regex-capture","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-weatherhead%2Fhttp-get-regex-capture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-weatherhead%2Fhttp-get-regex-capture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-weatherhead%2Fhttp-get-regex-capture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-weatherhead%2Fhttp-get-regex-capture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tom-weatherhead","download_url":"https://codeload.github.com/tom-weatherhead/http-get-regex-capture/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242995878,"owners_count":20218815,"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-11-17T03:15:59.791Z","updated_at":"2025-12-24T06:31:04.227Z","avatar_url":"https://github.com/tom-weatherhead.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# http-get-regex-capture\n\n[![build status](https://secure.travis-ci.org/tom-weatherhead/http-get-regex-capture.svg)](http://travis-ci.org/tom-weatherhead/http-get-regex-capture)  [![downloads](https://img.shields.io/npm/dt/http-get-regex-capture.svg)](https://www.npmjs.com/package/http-get-regex-capture)\n\nObtain text via an HTTP GET request, and then capture pieces of the text with regular expressions.\n\nThe demo app determines the latest stable versions of Node.js and Ruby by scraping their respective Websites.\n\nGit installation and execution instructions:\n\nInstall Git.\n\nInstall Node.js (e.g. via [nvm](https://github.com/creationix/nvm) or [Nodist](https://github.com/marcelklehr/nodist)).\n\nIn a terminal:\n\n\t$ npm i -g grunt\n\t$ git clone https://github.com/tom-weatherhead/http-get-regex-capture.git\n\t$ cd http-get-regex-capture\n\t$ npm i\n\t$ grunt\n\t$ npm start node\n\t$ npm start ruby\n\nNote: The command \"grunt\" runs lint, unit, and security tests.\n\nnpm installation and execution instructions:\n\n\t$ npm i -g http-get-regex-capture\n\t$ thaw-latest-version-of node\n\t$ thaw-latest-version-of ruby\n\nOptions:\n\n\t- returnHttpResponseBody: Boolean. If true, the body of the HTTP response will be returned as result.httpResponseBody .\n\n\t- returnHttpResponseStatus: Boolean. If true, the status code and status message of the HTTP response will be returned as result.httpResponseStatusCode and result.httpResponseStatusMessage respectively.\n\n\t- returnMatchObject: Boolean.\n\nExample 1:\n\n\tconst matchRegexesInWebPage = require('http-get-regex-capture');\n\n\tconst url = 'https://nodejs.org/en/';\n\tconst regexes = [\n\t\t/Download v{0,1}(\\S+)\\s+Current/\n\t];\n\tconst options = {\n\t\treturnHttpResponseStatus: true\n\t};\n\n\tmatchRegexesInWebPage(url, regexes, options)\t// Returns a Promise from the npm package 'q'.\n\t\t.then(result =\u003e {\n\t\t\tconsole.log('HTTP Reponse status:', result.httpResponseStatusCode, result.httpResponseStatusMessage);\n\t\t\tconsole.log('The latest available stable version of Node.js is', result.regexMatchResults[0].match);\n\t\t})\n\t\t.fail(error =\u003e {\n\t\t\tconsole.error('Failed to determine the latest available stable version of Node.js. Error:', error);\n\t\t})\n\t\t.done();\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftom-weatherhead%2Fhttp-get-regex-capture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftom-weatherhead%2Fhttp-get-regex-capture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftom-weatherhead%2Fhttp-get-regex-capture/lists"}