[pmwiki-users] Improving a certain recipe script
H. Fox
haganfox at users.sourceforge.net
Thu Mar 30 15:39:37 CST 2006
On 3/30/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > Neither of those is successful , nor is this:
> >
> > if (preg_match('!^ {.4,}$!s', $_POST['text'])) {
>
> The dot goes outside the curlies, the comma goes inside the curlies,
> as in:
>
> if (preg_match('!^ .{4,}$!', $_POST['text'])) {
>
> See, for example, http://www.pmichaud.com/sandbox/pattern.php .
> The meaning is match any character (.) four or more times ({4,}).
Still no luck.
Try this as Test.HasPreformattedLine.php on pmwiki.org
<? php if (preg_match('!^ .{4,}$!', $_POST['text'])) exit('Got it!');
and see if you can do an edit preview.
Hagan
More information about the pmwiki-users
mailing list