Saxon 1 Posted July 28, 2012 Report Share Posted July 28, 2012 Hi, I've tried about 20 selector. All I want to do is select everything before the first line break (\n). Should be simple right? But I'm having real problems with it. I've got the file loading done etc, all I need is a simple regex selector to find the first line please! This is the title inside the text file This is the next line I do not want to select, notice no period in the title! Quote Link to post Share on other sites
pftg4 102 Posted July 28, 2012 Report Share Posted July 28, 2012 Hi, I've tried about 20 selector. All I want to do is select everything before the first line break (\n). Should be simple right? But I'm having real problems with it. I've got the file loading done etc, all I need is a simple regex selector to find the first line please! This is the title inside the text file This is the next line I do not want to select, notice no period in the title! add list to list(%test, $list from text("This is the title inside the text file This is the next line I do not want to select, notice no period in the title!", $new line), "Delete", "Global") load html($list item(%test, 0)) sure you can work it out from here??? Pftg4 1 Quote Link to post Share on other sites
Saxon 1 Posted July 28, 2012 Author Report Share Posted July 28, 2012 Thanks anyway but I'm not sure what you mean, I need to use regex because every title is different. Quote Link to post Share on other sites
pftg4 102 Posted July 28, 2012 Report Share Posted July 28, 2012 Thanks anyway but I'm not sure what you mean, I need to use regex because every title is different. doesn't matter what the title is will always give the first line like you asked Quote Link to post Share on other sites
Saxon 1 Posted July 29, 2012 Author Report Share Posted July 29, 2012 Here is the regex for grabbing the first line of text. \A.* Using the method Pftg4 recomended all you need to do is add the text to a list and grab list position 0 and it will grab the firs line of text. Oh I see, it's the whole article in there, so I can use a variable instead. Ok thanks! Thanks guys! Quote Link to post Share on other sites
jason 101 Posted August 4, 2012 Report Share Posted August 4, 2012 Thx! Here is the regex for grabbing the first line of text. \A.* Using the method Pftg4 recomended all you need to do is add the text to a list and grab list position 0 and it will grab the firs line of text. 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.