This is a bit a strange issue. I am trying just to get sequential 3 digit integer from a string.
Now I thought I was successfully doing it using this code below...
preg_match_all('!\d+!', $image['title'], $integer); echo $integer[0][2];
But now it seems to be failing on some strings.
It works fine on these strings...
- TZR9000 Supertroop 2014 001
- FZR Mode 900 Impact 2014 003 Accessories
- NICE750 Destroyer 2014 020
But then it fails on this string...
- We like the moon 2013 Stand 010
Is there another possible way to extract the 3 digit integer successfully with out getting confused with other integers. I guess it will have to be a clever bit of php to do this.
The only consistent pattern there is, is there is always a space infront of the 3 digits and either a full-stop or a space after the 3 digits.