[TRE-general] Match Description

Setzer, Sebastian (ext) sebastian.setzer.ext at siemens.com
Tue Jun 12 20:17:54 EEST 2007


Hi,
On 26th April I had a similar question on this mailing-list. (maybe you
should read this, and the answers, first).

Right now, I use a wrapper around TRE with this interface:
--------------------------------------------------
typedef struct {
   ...
} regex_union_t;
extern int reg_union_comp(regex_union_t *p_reg,
	const char *patterns[], size_t pattern_count,
	int cflags);
extern int reg_union_nexec(const regex_union_t *p_reg, const char
*string, size_t len,
	unsigned *p_index, size_t nmatch, regmatch_t pmatch[], int
eflags);
extern void reg_union_free(regex_union_t *p_reg); 
--------------------------------------------------

If you're interested, I'll put the wrapper into an extra
translation-unit and post it to the mailing-list (probably on Friday ...
I'm not sure I've got the newest version of the wrapper on the PC I'm
using right now...)

Sebastian

> -----Original Message-----
> From: tre-general-bounces at lists.laurikari.net 
> [mailto:tre-general-bounces at lists.laurikari.net] On Behalf Of 
> Arliones Hoeller Jr
> Sent: Monday, June 11, 2007 8:35 PM
> To: tre-general at lists.laurikari.net
> Subject: [TRE-general] Match Description
> 
> 
> Hi everyone,
> 
> I'm using TRE to search texts for multiple regex at the same time. My
> problem is that I would like to know which one of my regexs 
> generated each
> match. Is it possible to have this information from the TRE?
> 
> If not, does anyone know whether it is possible or not to 
> modify TRE to
> support it? Is the relation between matches and antomaton final states
> stored? Or it is lost due to procedures like determinization, 
> minimization,
> etc.
> 
> Thank you,
> Arliones.
> 
> 
> _______________________________________________
> TRE-general mailing list tre-general at lists.laurikari.net
> http://laurikari.net/mailman/listinfo/tre-general
> http://laurikari.net/tre/
> 


More information about the TRE-general mailing list