Jump to content

Another Text File Question


Steven P

Recommended Posts

Sorry if this has been done before but...

 

 

I have a few lines of text in a text file that I want to use in a LISP - how do I get them there?

 

I reckon I can add a word or something in the text file to start where I want to copy and a word to end what I want to copy for example

 

 

Startcopy

Here is some text that

I want to copy to use

later

endcopy

 

 

startsecondtextcopt

...

...

endsecondtextcopy

 

 

 

 

There was a question he other day which I used for how to open a text file and read the whole contents to a variable but I want it to select just say, startcopy to endcopy above. Hope that makes sense so far.

 

 

If possible some sort of array so element 1 is line 1 of the text, element 2 is second line... but there are an unknown number of lines.

 

 

 

 

It would be great if you can help and point me in the right direction, thanks

Link to comment
Share on other sites

Try vl-string-search this will give you the position of the text you are looking for. Then use substr to chop up your string

 

Sent from my Pixel XL using Tapatalk

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...