#include <RE.h>
Public Methods | |
| RE (const string &pattern) | |
| Constructor. More... | |
| ~RE () | |
| bool | match (const string &s) | 
| string | get_matched (const int i) | 
| const int* | get_span (const int i) | 
| int | get_nsub () | 
| return number of subexpressions in the expression. More... | |
      
  | 
  
| 
 Constructor. Compile the given "pattern"(a regular expression) into internal form for matches which will be performed later on.  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 Get i-th matched substring. 
 
  | 
  
      
  | 
  
| 
 return number of subexpressions in the expression. 
  | 
  
      
  | 
  
| 
 Get the start and end index of i-th substring relative to the whole string. 
 
  | 
  
      
  | 
  
| 
 Match given string "s" with the compiled expression. "True" is returned for "match success", "false" for "match failed." The exception MatchError doesn't mean "match failed."  | 
  
1.2.7 written by Dimitri van Heesch,
 © 1997-2001