SaHiN 14 Posted June 10, 2017 Report Share Posted June 10, 2017 hi, set(#scrape,"1345689","Global")add list to list(%list,$list from text(#scrape,$new line),"Don\'t Delete","Global") my problem auto delete blank lines. necessary - blank lines #scrape 12 line%list 7 line auto delete blank lines how to make add blank lines? Quote Link to post Share on other sites
Varo 28 Posted June 10, 2017 Report Share Posted June 10, 2017 Use free plugin Large Data here http://network.ubotstudio.com/forum/index.php/topic/16308-free-plugin-large-data/ Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted June 10, 2017 Report Share Posted June 10, 2017 Hi, set(#scrape,"1 3 4 5 6 8 9 ","Global") alert($replace regular expression(#scrape,"\\s+",$new line)) add list to list(%data,$list from text($replace regular expression(#scrape,"\\s+",$new line),$new line),"Delete","Global") alert(%data) Regards,Nick Quote Link to post Share on other sites
SaHiN 14 Posted June 10, 2017 Author Report Share Posted June 10, 2017 Hi, set(#scrape,"1 3 4 5 6 8 9 ","Global") alert($replace regular expression(#scrape,"\\s+",$new line)) add list to list(%data,$list from text($replace regular expression(#scrape,"\\s+",$new line),$new line),"Delete","Global") alert(%data) Regards,Nick don't working nick Quote Link to post Share on other sites
HelloInsomnia 1103 Posted June 10, 2017 Report Share Posted June 10, 2017 This is a start at least, it won't get the last line still. But it will replace the others with _EMPTY_ so that you know it's supposed to be empty. I'm not 100% sure but I bet if you could convert that into a byte array it would be a lot easier because you could then read the carriage return and new line bytes - which I think is what is causing this problem.Maybe there's a Py way to do it @CD set(#scrape,"1 3 4 5 6 8 9 ","Global") clear list(%list) add list to list(%list,$list from text($replace($replace regular expression(#scrape,"[^\\d]+\\n","_EMPTY_"),"_EMPTY_","{$new line}_EMPTY_{$new line}"),$new line),"Don\'t Delete","Global") 1 Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted June 10, 2017 Report Share Posted June 10, 2017 lol, I thought SaHin wanted to remove the blank lines. So, you can use the large data plugin like Varo mentioned above. I am using UBot version 5.9.37 btw and don't delete is not working for me either. Is it reported? Maybe it is fixed at hire versions. Sure there is a python way but really depends on what SaHin is going to do with it. If SaHin wants to iterrate over it then we are kinda stuck. can use a $table!! add list to table as a column then loop total rows. orUse a place holder like @@ for the $new lines then iIF next list item contains @@ replace with $new line. Regards,Nick Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted June 10, 2017 Report Share Posted June 10, 2017 omg, this did not work either set(#scrape,"1 3 4 5 6 8 9 ","Global") clear table(&data) add list to table as column(&data,0,0,$list from text(#scrape,$new line)) alert(&data) What are you going to do with this data? Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted June 10, 2017 Report Share Posted June 10, 2017 Now I am baffled why this won't work. I just get one in the alert. set(#scrape,"1 3 4 5 6 8 9 ","Global") save to file("{$special folder("Desktop")}\\data.csv",#scrape) clear table(&data) create table from file("{$special folder("Desktop")}\\data.txt",&data) alert(&data) IDK Quote Link to post Share on other sites
pash 504 Posted June 11, 2017 Report Share Posted June 11, 2017 try this. Quote Link to post Share on other sites
SaHiN 14 Posted June 11, 2017 Author Report Share Posted June 11, 2017 try this.Pash Pls try, don't working. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted June 11, 2017 Report Share Posted June 11, 2017 Try this: set(#scrape,"1 3 4 5 6 8 9 ","Global") clear list(%replaceNewLines) add list to list(%replaceNewLines,$list from text($replace regular expression($replace regular expression(#scrape,"\\n",",_EMPTY_"),"_EMPTY_(?=\\d+)",$nothing),","),"Don\'t Delete","Global") Now your empty lines will say _EMPTY_ and you can choose to do whatever you need with those by looking for that tag. 1 Quote Link to post Share on other sites
SaHiN 14 Posted June 11, 2017 Author Report Share Posted June 11, 2017 Try this: set(#scrape,"1 3 4 5 6 8 9 ","Global") clear list(%replaceNewLines) add list to list(%replaceNewLines,$list from text($replace regular expression($replace regular expression(#scrape,"\\n",",_EMPTY_"),"_EMPTY_(?=\\d+)",$nothing),","),"Don\'t Delete","Global") Now your empty lines will say _EMPTY_ and you can choose to do whatever you need with those by looking for that tag. Very Good, nice Working Quote Link to post Share on other sites
SaHiN 14 Posted June 13, 2017 Author Report Share Posted June 13, 2017 Try this: set(#scrape,"1 3 4 5 6 8 9 ","Global") clear list(%replaceNewLines) add list to list(%replaceNewLines,$list from text($replace regular expression($replace regular expression(#scrape,"\\n",",_EMPTY_"),"_EMPTY_(?=\\d+)",$nothing),","),"Don\'t Delete","Global") Now your empty lines will say _EMPTY_ and you can choose to do whatever you need with those by looking for that tag. new problem dear, 13 lines = code 12 lines set(#scrape,"1 345 6 8 9","Global") Quote Link to post Share on other sites
HelloInsomnia 1103 Posted June 13, 2017 Report Share Posted June 13, 2017 Okay I see now this will account for either or both leading and trailing new lines like that: add list to list(%replaceNewLines,$list from text($replace regular expression($replace regular expression($replace regular expression(#scrape,"\\n","_EMPTY_,"),"(?<=\\d+)_EMPTY_",$nothing),",$",",_EMPTY_"),","),"Don\'t Delete","Global") 2 Quote Link to post Share on other sites
SaHiN 14 Posted June 13, 2017 Author Report Share Posted June 13, 2017 Okay I see now this will account for either or both leading and trailing new lines like that: add list to list(%replaceNewLines,$list from text($replace regular expression($replace regular expression($replace regular expression(#scrape,"\\n","_EMPTY_,"),"(?<=\\d+)_EMPTY_",$nothing),",$",",_EMPTY_"),","),"Don\'t Delete","Global")very good thank you Quote Link to post Share on other sites
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.