---On Thu, 21 Feb 2002 02:57:08 -0500, Dave O'Neill said
> On Wed, Feb 20, 2002 at 11:25:39PM -0500, FilmCan Web Support wrote:
>> Did I miss something obvious when I changed:
>> match = re.search(r"\s([0-9]+)x([0-9]+)\s", info)
>> to
>> match = re.search(r"\s([0-9]+)x([0-9]+)+0+0\s", info)
>
> In regular expression matching, the + character is special -- it means
> 'match one or more of the previous thing'. To make it work, you need to
> escape the + characters with a backslash, like so:
> match = re.search(r"\s([0-9]+)x([0-9]+)\+0\+0\s", info)
I use:
match = re.search(r"\s(\d+)x(\d+)\D", info)
it matches 'whitespace' 'any # of digits' 'an x' 'any # of digits' 'not a digit'
works with both 123x234+0+0 and 123x234 versions of identify.
--re: Re: ImageMagick differences?
Chris
Christopher R. Hawks Software Engineer
Syscon Plantstar a Division of Syscon International
-------------------------------------------------------------------------
I develop for Linux for a living, I used to develop for DOS. Going from
DOS to Linux is like trading a glider for an F117.
-- Lawrence Foard