ereg() problem



Hello php list;

I am having trouble with ereg().
The following is the problem code
$x = ereg("<route name='$to' x='../(.*)/in' rec='.*' />", $get_route, $m);
testing $route I get:
$route = $m[1];
print $route.'<br>';
jk/in' rec='a_378e6dc4.xml' /> (out put of print)
jk is all I am looking for but
is it greed that is missing the
forward slash and the single quote?
It seems like every time I do this I have to monkey around
with it until I get what I want. I have even changed the
formatting of files just so a regular expression would
work without this sort of trial and error.
Is there a way I can turn off greed in php's regex?
I am using php v5.1.2 with Apache 1.3.34
Thanks in advance.
JK
.



Relevant Pages

  • Help with Trace Route Info
    ... had Claus helping me with German customs and Poly helping me with ... trouble, and I don't always have trouble anywhere else. ... Tracing route to www.smarthinking.com ... or does too many jumps. ...
    (rec.games.computer.ultima.dragons)
  • Re: [PHP] ereg() problem
    ... I am having trouble with ereg. ... The following is the problem code ... formatting of files just so a regular expression would ...
    (php.general)
  • Re: How to Deactivate Winmail
    ... I know this is an old post but I am having trouble with mail also. ... not at all happy with the calendar and want desperately to go back to ... I am not able to find the computer configuration to go this route. ...
    (microsoft.public.windows.vista.general)
  • Re: NAO - packet loss?
    ... No obvious trouble while telnetting either, ... presumably a problem on the route either from you to nao or the route ... If other folks that are seeing loss can post a traceroute of where ... my upstream to work on the problem faster. ...
    (rec.games.roguelike.nethack)
  • Re: Mailing list software under OpenBSD
    ... >> graphical interface, or you can go the command line route. ... if you set it up you only might get shortly in trouble as ...
    (comp.unix.bsd.openbsd.misc)