I think this approach from Hans (below) should be cookbook-ized. I think it
could very easily become a very useful component in various situations.
Maybe change the markup to this?
(:grep "regex" wikifilename/pattern . :)
And then tomorrow I can ask for this?
(:grep options=[vqcn.] "regex" wikifilename/pattern . :)
And then the next day I can ask for this?
(:pipe (:grep .:) (:grep "regex" STDIN:) (:cut -d\t -f2 STDIN:) (:tail
-n 10 STDIN:):)
And then. OK, I'll stop.
-Peter
==(snip)===
From: Hans <[EMAIL PROTECTED]>
.
A different approach, I thought, would be to extract text rows from
a page which contain a certain string. Here is a definition of a markup
expression which does this. It should be added to config.php:
$MarkupExpr['textrows'] = 'ExtractTextRows($pagename, @$args[0],
@$args[1])';
function ExtractTextRows($pagename, $str, $source) {
if ($str=='' || $source=='') return '';
$pn = MakePageName($pagename, $source);
.
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users