Jump to content
UBot Underground

Simply select first line of text file


Recommended Posts

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!

Link to post
Share on other sites

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

  • Like 1
Link to post
Share on other sites

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

Link to post
Share on other sites

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!

Link to post
Share on other sites

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.

Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...