Um eine Teilgruppe von Dateien anzuzeigen, benutze ich folgenden Filterausdruck:
Feld : _filename
Filter : ^.+ - \d+ - .+$
Wie kann ich diesen Ausdruck negieren, so dass die gegenteilige Dateigruppe angezeigt wird?
DD.20060722.2135
Ist die Frage
[] zu schwer?
[ ] zu leicht?
[_] nicht zu beantworten?
DD.20060726.0927
dano
July 26, 2006, 6:52am
3
Das negieren von regulären Ausdrücken ist wohl keine einfache Sache, mir hat mal jemand geantwortet:
Ich habe mal eine Formel gefunden wie man ein Wort negiert, aber zu deinem Ausdruck fällt mir nichts ein.
Hmm ... Dano ... ich zitiere hier 'mal aus KEDIT for Windows Online Help :
Regular Expression Summary
Here is a summary of the components of regular expressions:
Item Meaning
? Wildcard character - matches any single character
^ Matches the beginning of a line
$ Matches the end of a line
[class] Definition of a character class - matches any character in class
[~class] Definition of a character unclass - matches characters not in class
(X) Parenthetical expressions - groups expressions together for other operations
X* Minimal closure - matches shortest possible string of zero or more occurrences of X
X+ Minimal plus - matches shortest possible string of one or more occurrences of X
X@ Maximal closure - matches longest possible string of zero or more occurrences of X
X# Maximal plus - matches longest possible string of one or more occurrences of X
X^n Power function - matches exactly n occurrences of X
~X Not function - succeeds only if X isn't matched
(X1|X2|...) Alternation - matches X1 or, if X1 doesn't match, matches X2, etc.
:letter Predefined expression
\x Escape sequence
\c Set cursor position/current column after Edit Find or CLOCATE
{X} Tagged expression - when X is matched the value is saved for later reference
&n Reference to value of nth tagged expression
~X Not Operator
The not operator doesn't really match anything. Instead, it checks to see if the immediately following item matches, and fails if it does. For example,
locate reg /book~s/
matches the string "book" whenever it is not immediately followed by an "s". So "book" would be matched in "bookcase", but not in "bookshelf".
locate reg /n~[0-9]^3/
This example looks for occurrences of the letter "n" that are not immediately followed by three digits. So it would match "n" in the strings "n12x" and "nabc", but not in the strings "n123" or "n5678".
Die Komponenten sind weitgehend in Mp3tag's RegExp Maschine implementiert.
Leider fehlt in Mp3tag der Not-Operator.
Vielleicht kann die RegExp Maschine in Mp3tag dahingehend erweitert werden?!?!
DD.20060726.1220
dano
July 26, 2006, 10:57am
5
Eine Option, welche die angezeigten Dateien mit den Ausgeblendeten vertauscht wäre vielleicht einfacher zu realisieren.
Hmm, das könnte als Workaround im Filterbereich auch schon helfen.
Ich denke aber an eine globale Reg Exp Lösung innerhalb von Mp3tag, also volle Unterstützung des kompletten RegExp Operatorsatzes bei Export, Formatierung und so weiter.
DD.20060726.1531