Regexp_Functions

Purpose

This module provides a non TTCN regular expression handling functions

Module Parameters

-

Module depends on

-

Current Owner

-

Last Review Date

-

Summary
Regexp_Functions This module provides a non TTCN regular expression handling functions
Functions
f_pcre_regexp Evaulate a Perl compatible regular expression
f_pcre_regexp Evaulate a Perl compatible regular expression

Functions

f_pcre_regexp

external function f_pcre_regexp( in  charstring  instr,
in  charstring  expression,
in  integer  groupno ) return charstring

Purpose

Evaulate a Perl compatible regular expression

Parameters

instr in charstring - string to be matched
expression in charstring - the pattern
groupno in inteher - the number of the group to return

Return Value

charstring the matched substring

Errors

-

Detailed description

This function returns the substring of the input character string instr, which is the content of n-th group matching to the expression.  The expression is a Perl compatible regular expression pattern.  The number of the group to be returned is specified by groupno, which shall be a positive integer or zero.  Group numbers are assigned by the order of occurrences of the opening bracket of a group and counted starting from 1 by step 1.  If the groupno is zero, a substring macthed by the entire pattern is returned.  If no substring fulfilling all conditions (i.e. pattern and group number) is found within the input string, an empty string is returned.

f_pcre_regexp

type record of charstring charstring_list external function f_pcre_regexp_list(
    in  charstring  instr,
    in  charstring  expression
) return charstring_list

Purpose

Evaulate a Perl compatible regular expression

Parameters

instr in charstring - string to be matched
expression in charstring - the pattern

Return Value

record of charstring the matched substrings

Errors

-

Detailed description

This function returns the list of the substring of the input character string instr, which is the content of n-th group matching to the expression.  The expression is a Perl compatible regular expression pattern.  Group numbers are assigned by the order of occurrences of the opening bracket of a group and counted starting from 1 by step 1.  If no substring fulfilling all conditions is found within the input string, an empty record of is returned.

external function f_pcre_regexp( in  charstring  instr,
in  charstring  expression,
in  integer  groupno ) return charstring
Evaulate a Perl compatible regular expression