2019-07-06T07:53:52ZFluxBBhttps://macscripter.net/viewtopic.php?id=46957Thanks for this info Shane.

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) samedi 6 juillet 2019 09:53:46]]>https://macscripter.net/profile.php?id=139352019-07-06T07:53:52Zhttps://macscripter.net/viewtopic.php?pid=196481#p196481And for the sake of completeness, to make it ignore case you would use "CONTAINS[c]".]]>https://macscripter.net/profile.php?id=17812019-07-05T23:41:05Zhttps://macscripter.net/viewtopic.php?pid=196473#p196473Thanks Nigel, it's exactly what I wanted.It's really fast.

Applescript:

use AppleScript version "2.4"
use framework "Foundation"
use scripting additions

#=====(*
Handler borrowed to Regulus6633 - http://macscripter.net/viewtopic.php?id=36861
*)on writeto(targetFile, theData, dataType, apendData)-- targetFile is the path to the file you want to write-- theData is the data you want in the file.-- dataType is the data type of theData and it can be text, list, record etc.-- apendData is true to append theData to the end of the current contents of the file or false to overwrite ittryset targetFile to targetFile as «class furl»set openFile to open for access targetFile with write permissionifnot apendData thenset eof of openFile to 0
write theData to openFile starting at eof as dataType
close access openFilereturn trueonerrortry
close access targetFileendtryreturn falseendtryend writeto

The predicate string should be either "NOT self CONTAINS %@" or "! self CONTAINS %@". You can parenthesise the "self CONTAINS %@" part if you like: "NOT (self CONTAINS %@)" or "! (self CONTAINS %@").]]>https://macscripter.net/profile.php?id=4572019-07-05T15:14:31Zhttps://macscripter.net/viewtopic.php?pid=196467#p196467I found a way to get the wanted result but I am always interested to know the correct filter.

Applescript:

use AppleScript version "2.4"
use framework "Foundation"
use scripting additions

set theSource to ((path to desktop as text) & "Titres m4p 20190704.txt") as «class furl»set oldList to paragraphs of (read theSource)

]]>https://macscripter.net/profile.php?id=139352019-07-05T15:12:00Zhttps://macscripter.net/viewtopic.php?pid=196466#p196466I know how to extract from a list items containing a substring but I prove unable to extract items which doesn't contain a substring.May you give me the correct filter to use ?

Applescript:

use AppleScript version "2.4"
use framework "Foundation"
use scripting additions

set theSource to ((path to desktop as text) & "Titres m4p 20190704.txt") as «class furl»set theList to paragraphs of (read theSource)