Adele Posted January 30, 2015 Share 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 Link to comment Share on other sites More sharing options...
Valuater Posted January 30, 2015 Share Posted January 30, 2015 Try splitting with @CR or @LF 8) Adele 1 Link to comment Share on other sites More sharing options...
Solution Adele Posted January 30, 2015 Author Solution Share 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 Link to comment Share on other sites More sharing options...
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