Web Scrapers Generator BrowserExt


Gets the text from the page in the corresponding of regular expression. Acceptable only inside the loadpage.

var = getregexp(pattern, [options = dict()]);


pattern Regular expression pattern.
options Parameters dictionary. May contain the following elements:
resultind Defines a number of group to return. 0 - is an array of all full pattern matches, 1 - an array of strings matched by the first parenthesized subpattern, and so on. The default is 0.
html By means of this parameter html code can be passed, then the function will look for regex in this html code but not in the loaded page.

Returned value: var is an array.

If you need to get the text from the arbitrary string, use the function regexp.

Example 1. Lets suppose that there is html-page with the address http://test.com/test.html, containing the following code:

<a href="http://test.com/1.html">one</a>
<a href="http://test.com/2.html">two</a>
<a href="http://test.com/3.html">three</a>

We will get all <a> by means of regular expression: