aboutsummaryrefslogtreecommitdiffstats
path: root/filter/filtertypes.xml
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-10-26 05:29:11 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-10-26 05:29:11 +0800
commit1c81f56fdefa6412bd1f3ae5f36ad3f872e25ce7 (patch)
tree9e18282eeb2fe230db745f3404b1e02afc68bf6f /filter/filtertypes.xml
parente2ebe055b611bd040558bffd990a5b6dafa1b334 (diff)
downloadgsoc2013-evolution-1c81f56fdefa6412bd1f3ae5f36ad3f872e25ce7.tar
gsoc2013-evolution-1c81f56fdefa6412bd1f3ae5f36ad3f872e25ce7.tar.gz
gsoc2013-evolution-1c81f56fdefa6412bd1f3ae5f36ad3f872e25ce7.tar.bz2
gsoc2013-evolution-1c81f56fdefa6412bd1f3ae5f36ad3f872e25ce7.tar.lz
gsoc2013-evolution-1c81f56fdefa6412bd1f3ae5f36ad3f872e25ce7.tar.xz
gsoc2013-evolution-1c81f56fdefa6412bd1f3ae5f36ad3f872e25ce7.tar.zst
gsoc2013-evolution-1c81f56fdefa6412bd1f3ae5f36ad3f872e25ce7.zip
Added option menu items to allow searching based on regular expressions.
2000-10-25 Jeffrey Stedfast <fejj@helixcode.com> * filtertypes.xml: Added option menu items to allow searching based on regular expressions. * filter-message-search.c (body_regex): New callback to match text in the body using regex. (body_contains): Modified to only match using strstr. (header_regex): New callback to match headers using regex. (header_contains): Modified to only match using strstr. svn path=/trunk/; revision=6177
Diffstat (limited to 'filter/filtertypes.xml')
-rw-r--r--filter/filtertypes.xml79
1 files changed, 73 insertions, 6 deletions
diff --git a/filter/filtertypes.xml b/filter/filtertypes.xml
index 930db4fc2a..6417ef261c 100644
--- a/filter/filtertypes.xml
+++ b/filter/filtertypes.xml
@@ -2,15 +2,31 @@
<filterdescription>
<partset>
<part name="sender">
- <title>Sender</title>
+ <title>Sender</title>
<input type="optionlist" name="sender-type">
<option value="contains">
- <title>contains</title>
- <code>(match-all (header-contains "From" ${sender}))</code>
+ <title>contains</title>
+ <code>
+ (match-all (header-contains "From" ${sender}))
+ </code>
</option>
<option value="not contains">
- <title>does not contain</title>
- <code>(match-all (not (header-contains "From" ${sender})))</code>
+ <title>does not contain</title>
+ <code>
+ (match-all (not (header-contains "From" ${sender})))
+ </code>
+ </option>
+ <option value="matches regex">
+ <title>matches regex</title>
+ <code>
+ (match-all (header-regex "From" ${sender}))
+ </code>
+ </option>
+ <option value="not match regex">
+ <title>does not match regex</title>
+ <code>
+ (match-all (not (header-regex "From" ${sender})))
+ </code>
</option>
</input>
<input type="string" name="sender"/>
@@ -34,6 +50,21 @@
(header-contains "Cc" ${recipient}))))
</code>
</option>
+ <option value="matches regex">
+ <title>matches regex</title>
+ <code>
+ (match-all (or (header-regex "To" ${recipient})
+ (header-regex "Cc" ${recipient})))
+ </code>
+ </option>
+ <option value="not match regex">
+ <title>does not match regex</title>
+ <code>
+ (match-all (not (or
+ (header-regex "To" ${recipient})
+ (header-regex "Cc" ${recipient}))))
+ </code>
+ </option>
</input>
<input type="address" name="recipient"/>
</part>
@@ -53,6 +84,18 @@
(match-all (not (header-contains "Subject" ${subject})))
</code>
</option>
+ <option value="matches regex">
+ <title>matches regex</title>
+ <code>
+ (match-all (header-regex "Subject" ${subject}))
+ </code>
+ </option>
+ <option value="not match regex">
+ <title>does not match regex</title>
+ <code>
+ (match-all (not (header-regex "Subject" ${subject}))
+ </code>
+ </option>
</input>
<input type="string" name="subject"/>
</part>
@@ -73,6 +116,18 @@
(match-all (not (header-contains ${header-field} ${word})))
</code>
</option>
+ <option value="matches regex">
+ <title>matches regex</title>
+ <code>
+ (match-all (header-regex ${header-field} ${word}))
+ </code>
+ </option>
+ <option value="not match regex">
+ <title>does not match regex</title>
+ <code>
+ (match-all (not (header-regex ${header-field} ${word}))
+ </code>
+ </option>
</input>
<input type="string" name="word"/>
</part>
@@ -89,7 +144,19 @@
<option value="not contains">
<title>does not contain</title>
<code>
- (not (body-contains "Subject" ${word}))
+ (not (body-contains ${word}))
+ </code>
+ </option>
+ <option value="matches regex">
+ <title>matches regex</title>
+ <code>
+ (body-regex ${word})
+ </code>
+ </option>
+ <option value="not match regex">
+ <title>does not match regex</title>
+ <code>
+ (not (body-regex ${word}))
</code>
</option>
</input>