I am currently learning the whole preg_match abacadabra.
To do this I decided to write a small app. to search within html tags of a page;
However I stumbled upon a problem when trying to search within alt tags:
I only want to search within the alt tags of images.
Using this code:
preg_match_all('/(<img\s) .* alt="(\w*)" .* (>)/ismxU', $code, $result);
It does not work the way I want it to, it does not seem to search only within the image tags...
Can anyone point me in the right direction?
Thanks in advance!