-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample_rules_edit.xml
More file actions
30 lines (23 loc) · 945 Bytes
/
Copy pathsample_rules_edit.xml
File metadata and controls
30 lines (23 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<txt2XML root_tag="XMLMail">
<!-- Sample_rules.xml. For use in the txt2XML
GUI tutorial. These rules are designed to
ingest mailing list digests into XML (database).
-->
<!-- first, remove the preamble, no info we want there -->
<ignore end="-{10,80}\n"/>
<!-- loop thru document, tagging up each email -->
<repeat>
<!-- each email begins with "Subject:" line and
ends with 10 to 80 dashes and a newline
-->
<match tag="email" start="^\s*?Subject:" end="\s*?-{3,80}\n" statusOfStart="accept" required="no">
<match tag="subject" start="^\s*?Subject:\s?" end="\n"/>
<match tag="sender" start="From:\s?" end="\n"/>
<match tag="time" start="Date:\s?" end="\n"/>
<match tag="number" start="X-Message-Number:\s?" end="\n"/>
<match tag="body"/>
</match>
</repeat>
<!-- remove last stuff w/ trash match -->
<match tag="TRASH"/>
</txt2XML>