Jump to content
pera_detlic

separating rows

Recommended Posts

pera_detlic

Hi ,

i need some help with separating text  into lines of  array 

i would like :ex

jaijdiajdiajdisajdiajd

dadadadadadadada

adadadadadadadad

to be $row[1] =  "jaijdiajdiajdisajdiajd" but auto generated, not manual , can u help me please?

cause its a long text , and i want each line to be different variable in array .

Ive tried string split and such , but its a line   i cant exactly use delimeter as every ends differently , help please, thanks

Share this post


Link to post
Share on other sites
water

Welcome to AutoIt and the forum!

StringSplit is the function to use. Can you post the code you used for StringSplit?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
JLogan3o13

@pera_detlic can you confirm, it sounds as though you are stating the entire file is one long continuous string?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
pera_detlic

yeah , file is long   continuos  string , that has rows , and i want to split them and assign each row a variable

Share this post


Link to post
Share on other sites
Terenz
#include <Array.au3>

$sString = "123456789101112332121332143423434324322342344323423423424321"
$sFinal = StringRegExp($sString, ".{1," & 10 & "}", 3) ; every 10 char
_ArrayDisplay($sFinal, "")

 

  • Like 1

Nothing is so strong as gentleness. Nothing is so gentle as real strength

 

Share this post


Link to post
Share on other sites
pera_detlic

thank you so much! @terenz

Share this post


Link to post
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

×