* @param {string} tagName * @param {string} type * @return {RegExp}
(tagName, type)
| 1128 | * @return {RegExp} |
| 1129 | */ |
| 1130 | function elementExtractor(tagName, type) { |
| 1131 | type = escapeRegExp(type); |
| 1132 | return new RegExp( |
| 1133 | `<${tagName}[\\s][^>]*['"]${type}['"][^>]*>([\\s\\S]+?)</${tagName}>`, |
| 1134 | 'gm' |
| 1135 | ); |
| 1136 | } |
| 1137 | |
| 1138 | // Data for example: http://localhost:8000/examples/bind/xhr.amp.html |
| 1139 | app.use('/bind/form/get', (req, res) => { |