Little help plz to filter some captures @ file append

i need little help
im trying to append file lines for some captures multi lines mostly same but i need to filter them out by this example -
Info = : | Name = | Level = | Email = | Region = | OLDbanreasons = | Banexpiredate = | LASTPLAYED = | AVERAGEENEMIES = | SOLOQRANK = | FLEXRANK = | WINSSOLOQ = | LOSSESSOLOQ = | WINSFLEX = | LOSSESFLEX = | RP =

this is the default shape 1 line capture for multi lines im trying to get idle ones from the captures , there’s LAST PLAYED = on line if you notice
from now on i got some captures without this part because the account is idle
i want to add loli code before file append lines to tell open bullet that i want to filter
the lines with no LASTPLAYED PART and add them to text

so the line i want to filter suppose to be like that -

Info = : | Name = | Level = | Email = | Region = | OLDbanreasons = | Banexpiredate = | AVERAGEENEMIES = | SOLOQRANK = | FLEXRANK = | WINSSOLOQ = | LOSSESSOLOQ = | WINSFLEX = | LOSSESFLEX = | RP =

without LASTPLAYED PART OR when LAST PLAYED part not exist in the line or capture thats it
sorry for my bad english but im trying to make it obvious as i can <3

So you want to filter the lines from the list that dont have “LASTPLAYED = |” in the string? If thats the case you can use listvariable = listvariable.where(x => !x.Contains("LASTPLAYED = |")) not 100% sure that code will work but you can try.

Thanks already got the help by someone and worked