A regular expression to match the the inner HTML for defined HTML document text.
npm install vamtiger-regex-html-body-inner-htmlbash
npm i --save vamtiger-regex-html-body-inner-html
`
or
`bash
yarn add vamtiger-regex-html-body-inner-html
`Usage
Import or require a referece to VAMTIGER Regex HTML Body Inner HTML:
`javascript
import regex from 'vamtiger-regex-html-body-inner-html';
`
or
`javascript
const regex = require('vamtiger-regex-html-body-inner-html').default;
`VAMTIGER Regex HTML Body Inner HTML can be used to match the body _inner HTML title_ for a defined HTML input string:
`javascript
const regex = require('vamtiger-regex-html-body-inner-html').default;const input =
;
const match = input.match(regex);/**
* if (match) {
* // Yep, the input string has a HTML title
* match[1] === '
'
* match[2] ===
* match[3] === ''
* }
**/
`Named capture groups can be referenced when used together with XRegExp:
`javascript
const XRegExp = require('xregexp');
const regex = require('vamtiger-regex-html-body-inner-html').default;
const input = ;
const match = XRegExp.exec(input, regex);
// const match: Match = XRegExp.exec(input, regex); // Typescript/**
* if (match) {
* // Yep, the input string has a HTML title
* match.openingBodyTag === '
'
* match.innerHtml ===
* match.closingBodyTag === ''
* }
**/
``