Search the Community
Showing results for tags '_stringbetween'.
-
Why doesn't print the output?? #include <String.au3> Global $x = 'gdsgklj fsdl dasfgh fsfef ghterfsd kia gdfhgfgdsgklj fsdl dasfgh fsfef' $z = _StringBetween($x, 'fsdl', 'kia') ConsoleWrite($z & @CRLF) Shouldn't it be dasfgh fsfef ghterfsd instead of nothing?
- 2 replies
-
- _stringbetween
- stringbetween
-
(and 1 more)
Tagged with:
-
Hi, have here some alternative method to count rows.. I can't use StringSplit coz array is already buided with _StringBetween, some tips pls, Reproducer code: #include <String.au3> #include <Array.au3> #include <IE.au3> $file = @TempDir&'\au3test.tmp' ConsoleWrite('File = '&$file&@CRLF) $oIE = _IECreate('http://autoitscript.com/forum',0,0) _IELoadWait($oIE) $sHTML = _IEBodyReadHTML($oIE) $wFile = FileWrite($file,$sHTML) $nFileHTML = FileOpen($file, 0) If @error then ConsoleWrite('error with FileOpen($file, 0)'&@CRLF) While 1 Local $aArray[10], $aRead = FileReadLine($nFileHTML) If @error then ExitLoop $aSearch = StringInStr($aRead,'<LI><SPAN') If $aSearch > 0 Then $aArray = _StringBetween($aRead, 'href="', '"') _ArrayDisplay($aArray) EndIf WEnd ProcessClose('IEXPLORE.EXE') FileDelete($file) Thanks in advance for any tips. Tedy.
-
Hi guys, i have a simple question. Sometime i'm using _StringBetween for situation like this: $test = "asdtewe[asdsad231321132@#]" $string = _StringBetween($test,"[","]") ConsoleWrite($string) Result is: asdsad231321132@# But if i want to remove that piece of string? Example remove all character/number/symbol between "[" and "]", included the "[" "]"? For a result like this: asdtewe Someone can post an example? Thanks for support
-
Hi guys, i have a little problem to set the @error to _StringBetween The script: While 1 $line = StdoutRead($CMDCommand) If @error Then ExitLoop $tmp = _StringBetween($line, "] ", '%') If Not @error Then $replace = StringReplace($tmp[0], "%", "") MsgBox(64, "Test", "string found") EndIf WEnd This script working, but i need to set something if the string don't match. I have try like this: While 1 $line = StdoutRead($CMDCommand) If @error Then ExitLoop $tmp = _StringBetween($line, "] ", '%') If Not @error Then $replace = StringReplace($tmp[0], "%", "") MsgBox(64, "Test", "string found") Else MsgBox(17, "Test", "no string found") EndIf WEnd But i have everytime the error MsgBox also if the string is found. Some advice? Thanks for support