From 1b2f93da31d0331244aa7c72068f4ec324e2cb71 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 27 Mar 2013 17:05:26 +0100 Subject: add RainerScript re_extract() function --- doc/rainerscript.html | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/rainerscript.html') diff --git a/doc/rainerscript.html b/doc/rainerscript.html index d76316ed..7cbbfa9f 100644 --- a/doc/rainerscript.html +++ b/doc/rainerscript.html @@ -66,6 +66,15 @@ variable, if it exists. Returns an empty string if it does not exist.
  • cstr(expr) - converts expr to a string value
  • cnum(expr) - converts expr to a number (integer)
  • re_match(expr, re) - returns 1, if expr matches re, 0 otherwise +
  • re_extract(expr, re, match, submatch, no-found) - extracts +data from a string (property) via a regular expression match. +POSIX ERE regular expressions are used. The variable "match" contains +the number of the match to use. This permits to pick up more than the +first expression match. Submatch is the submatch to match (max 50 supported). +The "no-found" parameter specifies which string is to be returned in case when +the regular expression is not found. Note that match and submatch start with +zero. It currently is not possible to extract more than one submatch with +a single call.
  • field(str, delim, matchnbr) - returns a field-based substring. str is the string to search, delim is the delimiter and matchnbr is the match to search for (the first match starts at 1). This works similar as the field based -- cgit v1.2.3