Custom Query

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (265 - 267 of 3893)

Ticket Resolution Summary Owner Reporter
#1464 Fixed StringRegExp, Single Char. Pattern with '*' Quantifier. Jon anonymous
Description

Well, It took we a wile to be sure. But I think the following data shows that AutoIt is outputting a wrong(incomplete) RE-result.

Used string 'abbabb' Used RegExp 'a?' or 'a*' (Problem seems limited to a single character capture pattern with a '*' or '?' quantifier) Used Replace '*'

Compared against: TRC=The Regex Coach.exe RT=www.regextester.com

setting:	(Global)	Global On	Global On	Global Off	Global Off
source:		AutoIt		RT-Repl		TRC-Repl	RT-Repl		TRC-Repl
result:		**bbabb		**b*b**b*b*	**b*b**b*b*	*bbabb		*bbabb
'a??' or 'a*?'					
result:		***bbabb	***b*b***b*b*	*a*b*b*a*b*b*	*abbabb		*abbabb

The think the problem is shown in that: 1) AutoIt seems to be using globalReplace mode, indicated by the leading '*' replacements.

  • They match up with the others when they are in GlobalReplace mode.

2) AutoIt is not showing the other '*' replacements that are present in the others. Both StringRegExpReplace() and StringRegExp() are consistent and identical in there behavior. In this case AutoIt seems to consistently stop when a failed matched is encountered. (so using 'b*' or '[a]*' will fail at the start of the string)

ConsoleWrite('Out1 = ' & StringRegExpReplace('abbabb','a*','*') & @CRLF) ; fail. '**bbabb'
ConsoleWrite('Out2 = ' & StringRegExpReplace('abbabb','b*a','*') & @CRLF) ;; ok. '**bb'
ConsoleWrite('Out3 = ' & StringRegExpReplace('abbabb','b*','*') & @CRLF) ;; fail. '*abbabb'
ConsoleWrite('Out4 = ' & StringRegExpReplace('abbabb','b*b','*') & @CRLF) ;; ok. 'a*a*'

(3.3.4.0)&(3.3.5.3),Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 3 CPU:X86 OS:X86)

#1466 Fixed _GUICtrlEdit_GetLine returns an unexpected character Jon ProgAndy
Description

When using _GUICtrlEdit_GetLine, an unexpected character is appended. Here is the corrected function.

; #FUNCTION# ====================================================================================================================
; Name...........: _GUICtrlEdit_GetLine
; Description ...: Retrieves a line of text from an edit control
; Syntax.........: _GUICtrlEdit_GetLine($hWnd, $iLine)
; Parameters ....: $hWnd        - Handle to the control
;                  $iLine       - Zero-based line index to get
; Return values .: Success      - The line of text
;                  Failure      - Empty string
; Author ........: Gary Frost (gafrost), Jos van der Zande <jdeb at autoitscript com >
; Modified.......: Gary Frost (gafrost)
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: Yes
; ===============================================================================================================================
Func _GUICtrlEdit_GetLine($hWnd, $iLine)
	If $Debug_Ed Then __UDF_ValidateClassName($hWnd, $__EDITCONSTANT_ClassName)
	If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd)

	Local $iLength = _GUICtrlEdit_LineLength($hWnd, $iLine)
	If $iLength = 0 Then Return ""
	Local $tBuffer = DllStructCreate("short Len;wchar Text[" & $iLength & "]")
	Local $pBuffer = DllStructGetPtr($tBuffer)
	DllStructSetData($tBuffer, "Len", $iLength + 1)
	Local $iRet = _SendMessage($hWnd, $EM_GETLINE, $iLine, $pBuffer, 0, "wparam", "ptr")

	If $iRet = 0 Then Return SetError($EC_ERR, $EC_ERR, "")

	Local $tText = DllStructCreate("wchar Text[" & $iLength & "]", $pBuffer)
	Return DllStructGetData($tText, "Text")
EndFunc   ;==>_GUICtrlEdit_GetLine
#1468 Fixed StringToBinary lost character in utf8 Jon maomao123_1981@…
Description

; Binary ANSI to String $buffer = StringToBinary("Hello - 你好123");lost two end character MsgBox(4096, "String() representation" , $buffer) $buffer = BinaryToString($buffer) MsgBox(4096, "BinaryToString() ANSI representation" , $buffer)

;_ClipPutFile have the bug like it

Note: See TracQuery for help on using queries.