Steven P Posted October 5, 2017 Share Posted October 5, 2017 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 Quote Link to comment Share on other sites More sharing options...
dan113 Posted October 5, 2017 Share Posted October 5, 2017 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 Quote Link to comment Share on other sites More sharing options...
Steven P Posted October 6, 2017 Author Share Posted October 6, 2017 Thanks Dan,. I'll try that today. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.