Jump to content

String Split By Line


Adele
 Share

Go to solution Solved by Adele,

Recommended Posts

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>>

kodevreni_1422641585__screenshot_2.png

$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.

kodevreni_1422641554__screenshot_1.png

My codes:

$sRead = StringSplit($sString, @CRLF)
MsgBox(0, "", $sString)
_ArrayDisplay($sRead)

I need your help. Thank you in advance.

Edited by Adele
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...