Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 0e54ba0ee564ce6063a5e83aa86060c5 > files > 207

festival-speechtools-devel-1.2.96-18.fc14.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>
<HEAD>
   <TITLE>class  EST_Regex</TITLE>
   <META NAME="GENERATOR" CONTENT="DOC++ 3.4.6">
</HEAD>
 <body bgcolor="#ffffff" link="#0000ff" 
	vlink="#dd0000" text="#000088" alink="9000ff">

<A HREF = "http://www.cstr.ed.ac.uk/">
   <IMG align=left BORDER=0 SRC = "cstr.gif"></A> 
<A HREF="http://www.cstr.ed.ac.uk/projects/speech_tools.html">
	<IMG BORDER=0 ALIGN=right SRC="est.jpg" width=150 height=93></A>
<br>

<br clear=left>
<p align=right>

In file ../include/EST_Regex.h:<TABLE BORDER=0><TR>
<TD VALIGN=TOP><H2>class  <A HREF="#DOC.DOCU">EST_Regex</A></H2></TD></H2></TD></TR></TABLE>
<BLOCKQUOTE>A Regular expression class to go with the CSTR EST_String class.</BLOCKQUOTE>
<HR>

<H2>Inheritance:</H2>
<APPLET CODE="ClassGraph.class" WIDTH=600 HEIGHT=65>
<param name=classes value="CEST_String,MEST_String.html,CEST_Regex,MEST_Regex.html">
<param name=before value="M,M">
<param name=after value="Md-,M">
<param name=indent value="0,1">
<param name=arrowdir value="down">
</APPLET>
<HR>

<DL>
<P><TABLE>
<DT><H3>Public Methods</H3><DD><TR>
<TD VALIGN=TOP><A HREF="#DOC.73.6"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_Regex</B> (void)<BR>
<I>Empty constructor, just for form</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.73.7"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_Regex</B> (<!1><A HREF="EST_String.html">EST_String</A> s)<BR>
<I>Construct from EST_String</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.73.8"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_Regex</B> (const char* ex)<BR>
<I>Construct from C string</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.73.9"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_Regex</B> (const <!1><A HREF="EST_Regex.html#DOC.73.9">EST_Regex</A> &amp;ex)<BR>
<I>Copy constructor</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.73.10"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>~EST_Regex</B> ()<BR>
<I>Destructor</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.73.11"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>int </TD><TD><B>size</B> () const <BR>
<I>Size of the expression</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.73.12"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>int </TD><TD><B>run</B> (const char* on, int from, int &amp;<!1><A HREF="EST_Track.html#DOC.71.7.9">start</A>, int &amp;<!1><A HREF="EST_Wave.html#DOC.81.5.6">end</A>, int* starts=NULL, int* ends=NULL)<BR>
<I>Run to find a matching substring</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.73.13"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>int </TD><TD><B>run_match</B> (const char* on, int from=0, int* starts=NULL, int* ends=NULL)<BR>
<I>Run to see if it matches the entire string</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.73.14"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="EST_String.html">EST_String</A> </TD><TD><B>tostring</B> (void) const <BR>
<I>Get the expression as a string</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.73.15"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>operator const char *</B> () const <BR>
<I>Cast operator, disambiguates it for some compilers</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.73.16"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>Assignment </B> <BR>
<I></I>
<P><TABLE>
<TR>
<TD VALIGN=TOP><A HREF="#DOC.73.16.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="EST_Regex.html">EST_Regex</A>&amp; </TD><TD><B>operator = </B> (const <!1><A HREF="EST_Regex.html">EST_Regex</A> ex)<BR>
<I></I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.73.16.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="EST_Regex.html">EST_Regex</A>&amp; </TD><TD><B>operator = </B> (const <!1><A HREF="EST_String.html">EST_String</A> s)<BR>
<I></I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.73.16.3"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="EST_Regex.html">EST_Regex</A>&amp; </TD><TD><B>operator = </B> (const char* s)<BR>
<I></I>
</TD></TR></TABLE></P>
</TD></TR></TABLE></P>

<P><TABLE>
<DT><H3>Protected Methods</H3><DD><TR>
<TD VALIGN=TOP><A HREF="#DOC.73.3"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>compile</B> ()<BR>
<I>Compile expression</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.73.4"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>compile_match</B> ()<BR>
<I>Compile expression in a form which only matches whole string</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.73.5"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>char* </TD><TD><B>regularize</B> (int match) const <BR>
<I>Translate the expression into the internally used syntax</I>
</TD></TR></TABLE></P>

</DL>
<HR><H3>Inherited from <A HREF="EST_String.html">EST_String</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Fields</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>static   const char* <B>version</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>static   const <!1><A HREF="EST_String.html">EST_String</A> <B>Empty</B>
<DT>
<P> <B>Split a string into parts.</B>
<P><DL>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.52.1">max</A></B>
</DL></P>
</DL></P>

<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>int <B>length</B>(void) const 
<DT>
<IMG ALT="o" SRC=icon2.gif>int <B>space</B>(void) const 
<DT>
<IMG ALT="o" SRC=icon2.gif>const char* <B>str</B>(void) const 
<DT>
<IMG ALT="o" SRC=icon2.gif>char* <B>updatable_str</B>(void)
<DT>
<IMG ALT="o" SRC=icon2.gif>static   <!1><A HREF="EST_String.html">EST_String</A> <B>FromChar</B>(const char c)
<DT>
<IMG ALT="o" SRC=icon2.gif>static   <!1><A HREF="EST_String.html">EST_String</A> <B>Number</B>(int i, int base=10)
<DT>
<IMG ALT="o" SRC=icon2.gif>static   <!1><A HREF="EST_String.html">EST_String</A> <B>Number</B>(long i, int base=10)
<DT>
<IMG ALT="o" SRC=icon2.gif>static   <!1><A HREF="EST_String.html">EST_String</A> <B>Number</B>(double <!1><A HREF="EST_SCFG_traintest.html#DOC.106.4">d</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>static   <!1><A HREF="EST_String.html">EST_String</A> <B>Number</B>(float <!1><A HREF="EST_Viterbi_Decoder.html#DOC.90.4">f</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>int <B>Int</B>(bool &amp;ok) const 
<DT>
<IMG ALT="o" SRC=icon2.gif>long <B>Long</B>(bool &amp;ok) const 
<DT>
<IMG ALT="o" SRC=icon2.gif>float <B>Float</B>(bool &amp;ok) const 
<DT>
<IMG ALT="o" SRC=icon2.gif>double <B>Double</B>(bool &amp;ok) const 
<DT>
<P> <B>Before </B>
<P><DL>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.75.40.1">before</A></B>(int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>, int len=0) const 
<DD><I>Part before position</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.75.40.2">before</A></B>(const char* s, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0) const 
<DD><I>Part before first matching substring after pos</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.75.40.3">before</A></B>(const <!1><A HREF="EST_String.html">EST_String</A> &amp;s, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0) const 
<DD><I>Part before first matching substring after pos</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.75.40.4">before</A></B>(<!1><A HREF="EST_Regex.html">EST_Regex</A> &amp;e, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0) const 
<DD><I>Part before first match of regexp after pos</I>
</DL></P>
<DT>
<P> <B>At </B>
<P><DL>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.75.41.1">at</A></B>(int from, int len=0) const 
<DD><I>Return part at position</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.75.41.2">at</A></B>(const char* s, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0) const 
<DD><I>Return part where substring found (not useful, included for completeness)</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.75.41.3">at</A></B>(const <!1><A HREF="EST_String.html">EST_String</A> &amp;s, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0) const 
<DD><I>Return part where substring found (not useful, included for completeness)</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.75.41.4">at</A></B>(<!1><A HREF="EST_Regex.html">EST_Regex</A> &amp;e, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0) const 
<DD><I>Return part matching regexp</I>
</DL></P>
<DT>
<P> <B>After </B>
<P><DL>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.75.42.1">after</A></B>(int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>, int len=1) const 
<DD><I>Part after pos+len</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.75.42.2">after</A></B>(const char* s, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0) const 
<DD><I>Part after substring</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.75.42.3">after</A></B>(const <!1><A HREF="EST_String.html">EST_String</A> &amp;s, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0) const 
<DD><I>Part after substring</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.75.42.4">after</A></B>(<!1><A HREF="EST_Regex.html">EST_Regex</A> &amp;e, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0) const 
<DD><I>Part after match of regular expression</I>
</DL></P>
<DT>
<P> <B>Search for something </B>
<P><DL>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.43.1">search</A></B>(const char* s, int len, int &amp;mlen, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0) const 
<DD><I>Find a substring</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.43.2">search</A></B>(const <!1><A HREF="EST_String.html">EST_String</A> s, int &amp;mlen, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0) const 
<DD><I>Find a substring</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.43.3">search</A></B>(<!1><A HREF="EST_Regex.html">EST_Regex</A> &amp;re, int &amp;mlen, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0, int* starts=NULL, int* ends=NULL) const 
<DD><I>Find a match of the regular expression</I>
</DL></P>
<DT>
<P> <B>Get position of something </B>
<P><DL>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.44.1">index</A></B>(const char* s, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0) const 
<DD><I>Position of substring (starting at pos)</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.44.2">index</A></B>(const <!1><A HREF="EST_String.html">EST_String</A> &amp;s, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0) const 
<DD><I>Position of substring (starting at pos)</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.44.3">index</A></B>(<!1><A HREF="EST_Regex.html">EST_Regex</A> &amp;ex, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0) const 
<DD><I>Position of match of regexp (starting at pos)</I>
</DL></P>
<DT>
<P> <B>Does string contain something? </B>
<P><DL>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.45.1">contains</A></B>(const char* s, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=-1) const 
<DD><I>Does it contain this substring?</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.45.2">contains</A></B>(const <!1><A HREF="EST_String.html">EST_String</A> &amp;s, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=-1) const 
<DD><I>Does it contain this substring?</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.45.3">contains</A></B>(const char c, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=-1) const 
<DD><I>Does it contain this character?</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.45.4">contains</A></B>(<!1><A HREF="EST_Regex.html">EST_Regex</A> &amp;ex, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=-1) const 
<DD><I>Does it contain a match for  this regular expression?</I>
</DL></P>
<DT>
<P> <B>Does string exactly match? </B>
<P><DL>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.46.1">matches</A></B>(const char* e, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0) const 
<DD><I>Exatly match this string?</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.46.2">matches</A></B>(const <!1><A HREF="EST_String.html">EST_String</A> &amp;e, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0) const 
<DD><I>Exatly match this string?</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.46.3">matches</A></B>(<!1><A HREF="EST_Regex.html">EST_Regex</A> &amp;e, int <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>=0, int* starts=NULL, int* ends=NULL) const 
<DD><I>Exactly matches this regular expression, can return ends of sub-expressions</I>
</DL></P>
<DT>
<P> <B>Global replacement </B>
<P><DL>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.47.1">gsub</A></B>(const char* os, const <!1><A HREF="EST_String.html">EST_String</A> &amp;s)
<DD><I>Substitute one string for another</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.47.2">gsub</A></B>(const char* os, const char* s)
<DD><I>Substitute one string for another</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.47.3">gsub</A></B>(const <!1><A HREF="EST_String.html">EST_String</A> &amp;os, const <!1><A HREF="EST_String.html">EST_String</A> &amp;s)
<DD><I>Substitute one string for another</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.47.4">gsub</A></B>(const <!1><A HREF="EST_String.html">EST_String</A> &amp;os, const char* s)
<DD><I>Substitute one string for another</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.47.5">gsub</A></B>(<!1><A HREF="EST_Regex.html">EST_Regex</A> &amp;ex, const <!1><A HREF="EST_String.html">EST_String</A> &amp;s)
<DD><I>Substitute string for matches of regular expression</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.47.6">gsub</A></B>(<!1><A HREF="EST_Regex.html">EST_Regex</A> &amp;ex, const char* s)
<DD><I>Substitute string for matches of regular expression</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.47.7">gsub</A></B>(<!1><A HREF="EST_Regex.html">EST_Regex</A> &amp;ex, int bracket_num)
<DD><I>Substitute string for matches of regular expression</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.47.8">subst</A></B>(<!1><A HREF="EST_String.html">EST_String</A> <!1><A HREF="XML_Parser.html#DOC.190.3.6">source</A>, int (&amp;starts)[EST_Regex_max_subexpressions], int (&amp;ends)[EST_Regex_max_subexpressions])
<DD><I>Substitute the result of a match into a string</I>
</DL></P>
<DT>
<P> <B>Frequency counts </B>
<P><DL>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.48.1">freq</A></B>(const char* s) const 
<DD><I>Number of occurances of substring</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.48.2">freq</A></B>(const <!1><A HREF="EST_String.html">EST_String</A> &amp;s) const 
<DD><I>Number of occurances of substring</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.75.48.3">freq</A></B>(<!1><A HREF="EST_Regex.html">EST_Regex</A> &amp;s) const 
<DD><I>Number of matches of regular expression</I>
</DL></P>
<DT>
<P> <B>Quoting </B>
<P><DL>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.75.49.1">quote</A></B>(const char quotec) const 
<DD><I>Return the string in quotes with internal quotes protected</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.75.49.2">quote_if_needed</A></B>(const char quotec) const 
<DD><I>Return in quotes if there is something to protect (eg.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.75.49.3">unquote</A></B>(const char quotec) const 
<DD><I>Remove quotes and unprotect internal quotes</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.75.49.4">unquote_if_needed</A></B>(const char quotec) const 
<DD><I>Remove quotes if any</I>
</DL></P>
<DT>
<P> <B>Operators </B>
<P><DL>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>const char <B><A HREF="#DOC.75.50.1">operator () </A></B>(int i) const 
<DD><I>Function style access to constant strings</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>char&amp; <B><A HREF="#DOC.75.50.2">operator [] </A></B>(int i)
<DD><I>Array style access to writable strings</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.75.50.3">operator const char*</A></B>() const 
<DD><I>Cast to const char * by simply giving access to pointer</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.75.50.4">operator char*</A></B>()
<DD><I>Cast to char *, may involve copying</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.75.50.5">Add to end of string. </A></B>
<P><DL>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A>&amp; <B><A HREF="#DOC.75.50.5.1">operator += </A></B>(const char* <!1><A HREF="EST_String.html#DOC.75.50.8.1">b</A>)
<DD><I>Add C string to end of EST_String</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A>&amp; <B><A HREF="#DOC.75.50.5.2">operator += </A></B>(const <!1><A HREF="EST_String.html">EST_String</A> <!1><A HREF="EST_String.html#DOC.75.50.8.1">b</A>)
<DD><I>Add EST_String to end of EST_String</I>
</DL></P>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.75.50.6">Asignment </A></B>
<P><DL>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A>&amp; <B><A HREF="#DOC.75.50.6.1">operator = </A></B>(const char* <!1><A HREF="EST_String.html#DOC.75.29">str</A>)
<DD><I>Assign C string to EST_String</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A>&amp; <B><A HREF="#DOC.75.50.6.2">operator = </A></B>(const char c)
<DD><I>Assign single character to EST_String</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A>&amp; <B><A HREF="#DOC.75.50.6.3">operator = </A></B>(const <!1><A HREF="EST_String.html">EST_String</A> &amp;s)
<DD><I>Assign EST_String to EST_String</I>
</DL></P>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.75.50.7">Concatenation </A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.75.50.8">relational operators </A></B>
<P><DL>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html#DOC.75.50.8.2">return</A> <B><A HREF="#DOC.75.50.8.1">b</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.75.50.8.2">return</A></B>(<!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>==<!1><A HREF="EST_String.html#DOC.75.50.8.1">b</A>)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html#DOC.75.50.8.2">return</A> <B><A HREF="#DOC.75.50.8.3">compare</A></B>(<!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>, <!1><A HREF="EST_String.html#DOC.75.50.8.1">b</A>)
</DL></P>
</DL></P>
<DT>
<P> <B>String comparison.</B>
<P><DL>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html#DOC.75.50.8.2">return</A> <B><A HREF="#DOC.75.51.1">compare</A></B>(<!1><A HREF="EST_String.html#DOC.75.50.8.1">b</A>, <!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.75.51.2">Case folded comparison.</A></B>
<P><DL>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>const <!1><A HREF="EST_String.html">EST_String</A>&amp; table <!1><A HREF="EST_String.html#DOC.75.50.8.2">return</A> <B><A HREF="#DOC.75.51.2.1">fcompare</A></B>(<!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>, <!1><A HREF="EST_String.html#DOC.75.50.8.1">b</A>, (const unsigned char* )(const char* )table)
</DL></P>
</DL></P>
<DT>
<IMG ALT="o" SRC=icon2.gif>static   <!1><A HREF="EST_String.html">EST_String</A> <B>cat</B>(const <!1><A HREF="EST_String.html">EST_String</A> s1, const <!1><A HREF="EST_String.html">EST_String</A> s2 = <!1><A HREF="EST_String.html#DOC.75.6">Empty</A>, const <!1><A HREF="EST_String.html">EST_String</A> s3 = <!1><A HREF="EST_String.html#DOC.75.6">Empty</A>, const <!1><A HREF="EST_String.html">EST_String</A> s4 = <!1><A HREF="EST_String.html#DOC.75.6">Empty</A>, const <!1><A HREF="EST_String.html">EST_String</A> s5 = <!1><A HREF="EST_String.html#DOC.75.6">Empty</A>, const <!1><A HREF="EST_String.html">EST_String</A> s6 = <!1><A HREF="EST_String.html#DOC.75.6">Empty</A>, const <!1><A HREF="EST_String.html">EST_String</A> s7 = <!1><A HREF="EST_String.html#DOC.75.6">Empty</A>, const <!1><A HREF="EST_String.html">EST_String</A> s8 = <!1><A HREF="EST_String.html#DOC.75.6">Empty</A>, const <!1><A HREF="EST_String.html">EST_String</A> s9 = <!1><A HREF="EST_String.html#DOC.75.6">Empty</A> )
</DL></P>

<P><DL>
<DT><H3>Public</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>typedef  int <B>EST_string_size</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>#define <B>MAX_STRING_SIZE</B>(INT_MAX)
</DL></P>

</DL>

<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>A Regular expression class to go with the CSTR EST_String class. 

<P>The regular expression syntax is the FSF syntax used in emacs and
in the FSF String library. This is translated into the syntax supported
by Henry Spensor's regular expression library, this translation is a place
to look if you find regular expressions not matching where expected.

<P></BLOCKQUOTE>
<DL>

<A NAME="compile"></A>
<A NAME="DOC.73.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void compile()</B></TT>
<DD>Compile expression
<DL><DT><DD></DL><P>
<A NAME="compile_match"></A>
<A NAME="DOC.73.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void compile_match()</B></TT>
<DD>Compile expression in a form which only matches whole string
<DL><DT><DD></DL><P>
<A NAME="regularize"></A>
<A NAME="DOC.73.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>char* regularize(int match) const </B></TT>
<DD>Translate the expression into the internally used syntax
<DL><DT><DD></DL><P>
<A NAME="EST_Regex"></A>
<A NAME="DOC.73.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_Regex(void)</B></TT>
<DD>Empty constructor, just for form
<DL><DT><DD></DL><P>
<A NAME="EST_Regex"></A>
<A NAME="DOC.73.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_Regex(<!1><A HREF="EST_String.html">EST_String</A> s)</B></TT>
<DD>Construct from EST_String
<DL><DT><DD></DL><P>
<A NAME="EST_Regex"></A>
<A NAME="DOC.73.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_Regex(const char* ex)</B></TT>
<DD>Construct from C string
<DL><DT><DD></DL><P>
<A NAME="EST_Regex"></A>
<A NAME="DOC.73.9"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_Regex(const <!1><A HREF="EST_Regex.html#DOC.73.9">EST_Regex</A> &amp;ex)</B></TT>
<DD>Copy constructor
<DL><DT><DD></DL><P>
<A NAME="~EST_Regex"></A>
<A NAME="DOC.73.10"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> ~EST_Regex()</B></TT>
<DD>Destructor
<DL><DT><DD></DL><P>
<A NAME="size"></A>
<A NAME="DOC.73.11"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int size() const </B></TT>
<DD>Size of the expression
<DL><DT><DD></DL><P>
<A NAME="run"></A>
<A NAME="DOC.73.12"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int run(const char* on, int from, int &amp;<!1><A HREF="EST_Track.html#DOC.71.7.9">start</A>, int &amp;<!1><A HREF="EST_Wave.html#DOC.81.5.6">end</A>, int* starts=NULL, int* ends=NULL)</B></TT>
<DD>Run to find a matching substring
<DL><DT><DD></DL><P>
<A NAME="run_match"></A>
<A NAME="DOC.73.13"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int run_match(const char* on, int from=0, int* starts=NULL, int* ends=NULL)</B></TT>
<DD>Run to see if it matches the entire string
<DL><DT><DD></DL><P>
<A NAME="tostring"></A>
<A NAME="DOC.73.14"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="EST_String.html">EST_String</A> tostring(void) const </B></TT>
<DD>Get the expression as a string
<DL><DT><DD></DL><P>
<A NAME="operator const char *"></A>
<A NAME="DOC.73.15"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> operator const char *() const </B></TT>
<DD>Cast operator, disambiguates it for some compilers
<DL><DT><DD></DL><P>
<A NAME="Assignment "></A>
<A NAME="DOC.73.16"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Assignment </B></TT>
<DL><DT><DD></DL><P><DL>

<A NAME="operator = "></A>
<A NAME="DOC.73.16.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="EST_Regex.html">EST_Regex</A>&amp; operator = (const <!1><A HREF="EST_Regex.html">EST_Regex</A> ex)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator = "></A>
<A NAME="DOC.73.16.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="EST_Regex.html">EST_Regex</A>&amp; operator = (const <!1><A HREF="EST_String.html">EST_String</A> s)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator = "></A>
<A NAME="DOC.73.16.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="EST_Regex.html">EST_Regex</A>&amp; operator = (const char* s)</B></TT>
<DL><DT><DD></DL><P></DL>
</DL>

<HR><DL><DT><B>This class has no child classes.</B></DL>

<DL><DT><DT><B>Friends:</B><DD>  ostream &amp;operator &lt;&lt; (ostream &amp;s, const <!1><A HREF="EST_Regex.html">EST_Regex</A> &amp;<!1><A HREF="EST_String.html#DOC.75.29">str</A>)<BR><DT><B>Author:</B><DD>Richard Caley &lt;rjc@cstr.ed.ac.uk&gt;
(regular expression library by Henry Spencer, University of Toronto)

<DT><B>Version:</B><DD><IMG BORDER=0 SRC=g000004.gif>
<DT><B>See Also:</B><DD><!1><A HREF="EST_String.html">EST_String</A>
<BR>string_example
<BR><DD></DL><P><P><I><A HREF="index.html">Alphabetic index</A></I> <I><A HREF="HIER.html">HTML hierarchy of classes</A> or <A HREF="HIERjava.html">Java</A></I></P><HR>
<A HREF = "http://www.ed.ac.uk/">
   <IMG align=right BORDER=0 SRC = "edcrest.gif"></A>

<P Align=left><I>This page is part of the 
<A HREF="http://www.cstr.ed.ac.uk/projects/speech_tools.html">
Edinburgh Speech Tools Library</A> documentation
<br>
Copyright <A HREF="http://www.ed.ac.uk"> University of Edinburgh</A> 1997
<br>
Contact: <A HREF="mailto:speech_toolss@cstr.ed.ac.uk"> 
         speech_tools@cstr.ed.ac.uk </a>
</P>
<br clear=right>