This example is intended the shed some light on the use of the POS parameter of the EXTRACT command.
Consider the following HTML source code from which you would like to extract the Text to be extracted part:
<B>Hello World</B>
<B>Text to be extracted</B>
<B>Good Morning</B>
<B>Good Afternoon</B>
<B>(c) iOpus</B>
The extraction anchor is clearly <B>* because the information is enclosed by a B tag. However, on this page this anchor can potentially match all 5 texts - we cannot further indicate which text to extract by tweaking the extraction anchor. But we can tell iMacros which occurence of the extraction anchor to extract. Hence the correct EXTRACT command is:
EXTRACT POS=2 TYPE=TXT ATTR=<B>*
As said before, you must use * at the end of the extraction anchor to tell iMacros that it should ignore the rest of the elements when searching for the anchor.
Starting with Version V4.30 you can also use relative positioning for the extraction anchor.
Page URL http://www.iopus.com/imacros/help/extract_example_pos.htm