regexp changed in php4beta3?
| From: | Mac Schwarz | Date: | Mon, 14 Feb 2000 14:31:07 +0000 |
| Subject: | regexp changed in php4beta3? | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-10248@lists.php.net to get a copy of this message | ||
Hi,
I installed php4 Beta 3 and apache 1.3.11 this weekend. It's working
well except with one php script which worked before with apache 1.3.9
and php 3.0.9 and stopped working now.
It's a really simple task but I still didn't figure out what went
wrong:
-----------------------------------------------------------
$seite = $QUERY_STRING;
$retval = ereg("([tgeia]+)([0-9]+)", $seite, $query_chunks);
$typ=$query_chunks[1];
$lektion=$query_chunks[2];
-----------------------------------------------------------
should take an query string like 'script.php?i3' or '...php?g3_11' and
set $typ to the letter e.g. 'i' and $lektion to the first number after
the letter e.g. '3'. The letter is one of t,g,e,i or a.
This worked with my old configuration. $query_chunks[1] was the letter
and $query_chunks[2] the number.
Now $query_chunks[0] is the letter and $query_chunks[1] and [2] are
empty. According to the php3 documentation $query_chunks[0] should
have the value of $seite.
Am I missing something obvious?
Reagrds,
mac
--
Mac Schwarz / AERIA Projekt / Inst. f. Klassische Archaeologie
e-mail: mac@aeria.phil.uni-erlangen.de / Tel.: 09131-85-24791
FAU Erlangen-Nuernberg / Kochstr.4 / 91054 Erlangen
<http://www.phil.uni-erlangen.de/~p1altar/aeriahome.html>