Re: Regular Expressions

From: Date: Thu, 15 Jul 2004 13:29:28 +0000
Subject: Re: Regular Expressions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-190587@lists.php.net to get a copy of this message
In article <20040715144024.00007d80@ariktab>, Arik Raffael Funke wrote: > implement following pattern "Last Name:\s*(.*)\n". > I get just 'Jason'. But what I currently get is: > Jason > Street: abc This is behaviour because (.*) is greedy. As you noticed, it matched "Jason \nStreet:abc" /Last Name:\s+(.*?)\n/ -- Tim Van Wassenhove <http://home.mysth.be/~timvw>

« previous php.general (#190587) next »