Hi Hans,
My purpose here is to test if one can use TextExtract in place of
conventional Include with something like
(:pagelist .* regex=1 fmt=extract page=*.*#section#sectionend :)

On some pages I have an anchored todo section enclosed like this :

[[#afaire]
*one
*two
[[#finafaire]]

Then, I would like to use TextExtract new capabilities to extract all text
enclosed between the anchors [[#afaire]] & [[#finafaire]].
Here there are my tests and my trouble :

(:pagelist vérifier fmt=extract page=Argot.*#afaire#finafaire name=-Afaire
count=10:)
result : I got the lines where there is the word /vérifier/ in pages from
goup Argot, source limited to the section, nice.
But as I need everything is enclosed between anchors, I will use regex
option and /.*/ as searched pattern. I wish I'm right.

(:pagelist .* regex=1 fmt=extract page=Argot.*#afaire#finafaire name=-Afaire
count=10:)
Here is the trouble (see next test for comparing), result : Found no
matches!

(:pagelist .* regex=1 fmt=extract page=Argot.* name=-Afaire count=10:)
Works : give me all text from 10 pages.

So : if I use regex=1 and limited search in anchored sections, there is a
problem that disappear if I don't use anchored sections.

Test can be seen there :
http://www.languefrancaise.net/docs/Test/TextExtract
(visible password)

Thank you for your interest,
Gilles.

2009/9/28 Hans <[email protected]>

> Monday, September 28, 2009, 12:06:36 AM, Hans wrote:
>
> > And I need to think about point 2. if it is right to allow rows
> > which have no matches, because they have been removed in the process.
>
> Now available in latest release version 2009-09-28
>
> If snip='pattern' removes the match in a row, the row will still be
> passed as result output, and the match count will be tasaken from the
> row before the snipping, so you get a positive result number,
> even though no match is highlighted (because snip='pattern' removed it).
> usefult to get text extract by looking for keywords/markers in the
> text without showing these for instance.
>
>
>  ~Hans
>
>
> _______________________________________________
> pmwiki-users mailing list
> [email protected]
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>



-- 
---------------------------------------
| A | de la langue française
| B | http://www.languefrancaise.net/
| C | [email protected]
---------------------------------------
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to