dexter8203 0 Posted March 2, 2016 Report Share Posted March 2, 2016 Hi, This is my first time posting a questions as I've usually been able to find what I'm looking for online. My bot is scraping a table. When I scrape the table, I'm copying two of the columns to a list. Within each list item is an array of values that are line followed by line breaks. Ideally I would like to replace the line breaks with a "," or a "SPACE" . For example, a given field in the table or list item will contain 01CA02DW031904230431 I need it to be 01CA, 02DW, 0319, 0423, 0431. I'm hopeful someone here can point me in the right direction. Quote Link to post Share on other sites
deliter 203 Posted March 2, 2016 Report Share Posted March 2, 2016 my regex sucks but this should work set(#item,"01CA 02DW 0319 0423 0431","Global") set(#newItems,$replace regular expression(#item,"\\s+|/n",","),"Global") 1 Quote Link to post Share on other sites
Varo 28 Posted March 3, 2016 Report Share Posted March 3, 2016 No need |/n just \s+ set(#item,"01CA 02DW 0319 0423 0431","Global") set(#newItems,$replace regular expression(#item,"\\s+",","),"Global") Quote Link to post Share on other sites
dexter8203 0 Posted March 3, 2016 Author Report Share Posted March 3, 2016 thank you. This is exactly what i needed. 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.