Adele Posted January 30, 2015 Posted January 30, 2015 (edited) I have a string and I want split it by line. I have tried these codes on that topic from but the correct results don't return when it has made _ArrayDisplay. '?do=embed' frameborder='0' data-embedContent>> $aResult = StringSplit($YourString,@CRLF,1) StringRegExp ($sData, "(?:\s*)?(.+)(?:\n)?", 3) Func _StringGetLine ($sString, $iLine, $bCountBlank = False) Local $sChar = "+" If $bCountBlank = True Then $sChar = "*" If Not IsInt ($iLine) Then Return SetError (1, 0, "") Return StringRegExpReplace ($sString, "((." & $sChar & "\n){" & $iLine - 1 & "})(." & $sChar & "\n)((." & $sChar & "\n?)+)", "\2") EndFunc ; ==> _StringGetLine When I display the string with MsgBox(), there is no problem. My codes: $sRead = StringSplit($sString, @CRLF) MsgBox(0, "", $sString) _ArrayDisplay($sRead) I need your help. Thank you in advance. Edited January 30, 2015 by Adele
Solution Adele Posted January 30, 2015 Author Solution Posted January 30, 2015 (edited) The problem had been on the string . I have realized just now. The topic has fixed. Thank you to everyone. Edited January 30, 2015 by Adele
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now