[pmwiki-users] Improving a certain recipe script

H. Fox haganfox at users.sourceforge.net
Wed Mar 29 21:40:45 CST 2006


On 3/29/06, H. Fox <haganfox at users.sourceforge.net> wrote:
> How would I test for the following in a recipe script:
>
> $SomeNumber = NN;
> if (a line in wikitext starts with a space and has more than
> $SomeNumber characters) { # Do something. }

Not a line in wikitext, a line in posted wikitext.  I think it will be
something like

if preg_match("!^ <something>$!", @$_POST['text']) # Do something.

where <something> is Perl regular-expressionese for "more than
$SomeNumber characters".

Hagan




More information about the pmwiki-users mailing list