Skip to content

Commit 46e7a3c

Browse files
committed
Changed: Regexp pattern in internal __WinHttpAttribVal for better matching.
1 parent 3d04484 commit 46e7a3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WinHttp.au3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2140,7 +2140,7 @@ Func __WinHttpFormAttrib(ByRef $aAttrib, $i, $sElement)
21402140
EndFunc
21412141

21422142
Func __WinHttpAttribVal($sIn, $sAttrib)
2143-
Local $aArray = StringRegExp($sIn, '(?i).*?\b' & $sAttrib & '\h*=(\h*"(.*?)"|' & "\h*'(.*?)'|" & '\h*(.*?)(?: |\Z))', 3) ; e.g. id="abc" or id='abc' or id=abc
2143+
Local $aArray = StringRegExp($sIn, '(?i).*?(\A| )\b' & $sAttrib & '\h*=(\h*"(.*?)"|' & "\h*'(.*?)'|" & '\h*(.*?)(?: |\Z))', 3) ; e.g. id="abc" or id='abc' or id=abc
21442144
If @error Then Return ""
21452145
Return $aArray[UBound($aArray) - 1]
21462146
EndFunc

0 commit comments

Comments
 (0)