|
Posted by splodge on 03/21/06 22:39
I have a simple regular expression:
[0-9]{1,5}x[0-9]{1,5}
Which is designed to detect the width and height of an image from a
string, as in:
foo 100x100 bar
However, when I run this with preg_match I get an unknown modifier
error, pointing to { . Could someone please explain what I am doing
wrong and how to make this work.
preg_match("[0-9]{1,5}x[0-9]{1,5}", $output, $widthHeight);
$output is the string containing the width height values
$widthHeight is the returning array.
Many thanks.
P.s. Maximum image size is 99999x99999
Navigation:
[Reply to this message]
|