Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

SRE - adding chars to pattern produces invalid results

$
0
0
In the following code the first SRE produces what I am looking for but the second does not. It seems like it should produce the same result.

[ autoit ]      
#include <array.au3> ; This works local $str = '<img width="20" height="22"> <a src="/icons/text.gif" alt="[TXT]" 2732618_readme.htm href="2790817%202732618_readme.htm"> 2790817 </a>' $aTemp = stringregexp($str,'>(.*?)<',3) _arraydisplay($aTemp,'Without /a') ; This returns too much local $str = '<img width="20" height="22"> <a src="/icons/text.gif" alt="[TXT]" 2732618_readme.htm href="2790817%202732618_readme.htm"> 2790817 </a>' $aTemp = stringregexp($str,'>(.*?)</a',3)   ; added /a to pattern _arraydisplay($aTemp,'With /a')

Can someone explain why, please?

kylomas

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>