Hi,
Did you try using the '\s' modifier?
You could write the line like:
$url = preg_match("/([page])\s(.+?\s)\s*([\/page])/",$newcontent, $amatch);
in fact, i tested this code with my own form:
<form method="post" action="<?php $SCRIPT_NAME ?>" name="aform">
<textarea name="text" value="" rows="5" cols="30"></textarea>
<input type="submit">
</form>
<?php
if(isSet($text)) {
$newcontent = $text;
$url = preg_match("/([page])\s(.+?\s)\s*([\/page])/",$newcontent, $amatch);
/ This will print out 0(false) or 1(true) to
see if whatever was entered in the text area
matches the regular expression, including newline chars. /
echo $url;
}
?>
feel free to copy this and test it on your own page to see if could possibly point you in the right direction.
Bart