Re: preg_match fails to resolve variable as a subject

From: Date: Sat, 27 Nov 2010 01:28:38 +0000
Subject: Re: preg_match fails to resolve variable as a subject
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-309693@lists.php.net to get a copy of this message
On 11/27/10 00:57, Richard Quadling wrote:
On 26 November 2010 00:07, Da Rock<php-list@herveybayaustralia.com.au> wrote:
preg_match("/(\d{1,3})(\.)$/", exec($mixer . ' ' . $command),&$matches)
     
Can you ... var_dump(exec($mixer . ' ' . $command)); I wonder if the output includes a new line which you are not accounting for in the regex. Haven't tried yet, but isn't that what $ is for? End of line?
And exec only gives one line- the last line of the output of the command. You have to provide a reference to an array for the entire output. var_dump gives: string(41) "Mixer vol is currently set to 75:75" Any thoughts?

« previous php.general (#309693) next »