Jump to content
UBot Underground

Recommended Posts

I scraped content into a table... Now, on the 4th column of each row it has a word, and what I want to do is create a new table that consists only of the rows that contain a specific word that is in the 4th column.

 

Example: the 4th column might have the following words... my,me,you,they ... get me?... and I only want to capture the rows that contain the word 'me' in that column.

 

Any ideas?

Link to post
Share on other sites

Can you elaborate?

 

set(#position, 0, "Global")
loop($table total rows(&RESULTS)) {
    if($contains($table cell(&RESULTS#position, 4), "us")) {
        then {
        }
        else {
        }
    }
}

Link to post
Share on other sites

at: then{

 

just copy the cell to a list or table, 

 

the else could be empty, and then outside the if, but still in the loop, just have delete row 0, 

 

that way you wouldn't have to increment the table row variable, it would always just check row 0, if it has 'us' then copy to other table, 

Link to post
Share on other sites

I really appreciate the help man - And what you're saying makes perfect sense,  I'm just not seeing any commands/functions to achieve that.

 

Maybe I have just been awake too many hours :-) ... I'll go get some sleep and maybe it will be more clear to me when I come back.

 

Thanks again.

  • Like 1
Link to post
Share on other sites

Is it the actual words that you need out of that table? i'm not sure if your needing to record the actual row number or not yet, 

 

anyway if you're not, this would be nicer.

loop while($comparison($table total rows(&results), ">", 0)) {
    if($contains($table cell(&results, 0, 4), "us")) {
        then {
            comment("move into a seperate list / table")
        }
        else {
        }
    }
    plugin command("TableCommands.dll", "delete from table", &results, "Row", 0)
}

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...