F
FabSW
hi all, i've to replace the src tag in a html file with regex,
images tags look like this :
<td valign="top" align="middle" width="74"><img height="40"
src="1_interr.gif" alt="1_interr.gif" width="40" /></td>
what i want to do is to match form <img.... to... /> but backtrack
only 1_interr.gif
i tried using lookbehind and lookahead assertions with this pattern
(?<=<img.*?src=.*?")(?<src>([^"]*?))(?=".*?>)
but i returns 3 matches :
1_interr.gif
width=
40
i need only first one
what's wrong ?
thanks.
images tags look like this :
<td valign="top" align="middle" width="74"><img height="40"
src="1_interr.gif" alt="1_interr.gif" width="40" /></td>
what i want to do is to match form <img.... to... /> but backtrack
only 1_interr.gif
i tried using lookbehind and lookahead assertions with this pattern
(?<=<img.*?src=.*?")(?<src>([^"]*?))(?=".*?>)
but i returns 3 matches :
1_interr.gif
width=
40
i need only first one
what's wrong ?
thanks.