PATTERN MATCHING

images php coding issues or problems here.

Moderators: macek, egami, gesf

mohdali1
New php-forum User
New php-forum User
Posts: 10
Joined: Mon Mar 03, 2003 9:32 pm

PATTERN MATCHING

Postby mohdali1 » Sat Apr 30, 2005 4:29 am

I am using imagemagick to identify an image file with the following
expressions:

$match = '#'.preg_quote($this->imageName).' (.+) (\d+)x(\d+) (\w+) (.+) (\d+) [b|kb|mb]#';

I get error when using above expressions to match following output of identify command:

$ identify ocp.jpg

$ ocp.jpg JPEG 368x107+0+0 DirectClass 8-bit 25.5kb 0.020u 0:01

Now I am looking for new expressions to match the above output.

Thanks in advance.

Regards
Muhammad Ali

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Postby ruturajv » Sun May 01, 2005 7:43 pm

why don't you just do an explode with a space as a delimiter 8O


Return to “PHP coding => Images”

Who is online

Users browsing this forum: No registered users and 1 guest

cron