Re: preg_match fails to resolve variable as a subject

From: Date: Fri, 26 Nov 2010 16:43:31 +0000
Subject: Re: preg_match fails to resolve variable as a subject
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-309689@lists.php.net to get a copy of this message
On Nov 25, 2010, at 6:07 PM, Da Rock wrote:
preg_match("/(\d{1,3})(\.)$/", exec($mixer . ' ' . $command), &$matches)
it looks like you're failing to account for the newline that comes back in a command execution. Add trim() around the exec() call and try again.

« previous php.general (#309689) next »