name mode size
Makefile 100644 189B
README 100644 1.33kB
textops.c 100644 8.96kB
# # $Id$ # This is mostly an example module. It implements text based operation (search, replace, append a.s.o). Exported Functions: ------------------ Name: search(re) Params: re - regular expression Desc: Searches for the re in the message Example: if ( search("[Ss][Ee][Rr]" ) { /*....*/ } Name: search_append(re, txt) Params: re - regular expression txt - string Desc: Searches for the first match of re and appends txt after it Example: search_append("[Ss]er", " blabla") Name: replace(re, txt) Params: re - regular expression txt - replacement string Desc: replaces the first occurence of re with txt Example: replace("ser", "Sip Express Router") Name: append_to_reply(txt) Params: txt - string Desc: append txt to the reply? Name: append_hf(txt) Params: txt - string (usually a new header) Desc: appends txt after the last header field Example: append_hf("P-hint: VOICEMAIL\r\n"); Name: append_urihf(prefix,suffix) Params: prefix -- string (usually at least header field name) suffix -- string (usually at least line terminator) Example: append_urihf("CC-Diversion: ", "\r\n") Known Limitations: ------------------ search ignores folded lines. For example, search("(From|f):.*") doesn't match the following From header field: From: medabeda <>;tag=1234