Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

JRegex Class Reference

Regular expression matching interface. More...

#include <JRegex.h>

List of all members.

Public Methods

 JRegex (const char *pattern, int fast=0)
 constructor takes an optional second argument; set to 1 if you're going to use this pattern several times and want to optimize it. More...

 ~JRegex ()
int match (const char *str, int len) const
 Check for a match in str. Returns -1 for no match. More...

int search (const char *str, int len, int &length, int start=0)
 Search for the first match, starting at str+start. Returns the offset into the string where the match begins. The match has length length. If no match was found, returns -1. More...


Detailed Description

Regular expression matching interface.

Definition at line 25 of file JRegex.h.


Constructor & Destructor Documentation

JRegex::JRegex const char *    pattern,
int    fast = 0
 

constructor takes an optional second argument; set to 1 if you're going to use this pattern several times and want to optimize it.

Definition at line 40 of file JRegex.C.

References NULL, and vmdpcre_compile.

JRegex::~JRegex  
 

Definition at line 109 of file JRegex.C.

References vmdpcre_free.


Member Function Documentation

int JRegex::match const char *    str,
int    len
const
 

Check for a match in str. Returns -1 for no match.

Definition at line 120 of file JRegex.C.

References NULL, and vmdpcre_exec.

int JRegex::search const char *    str,
int    len,
int &    length,
int    start = 0
 

Search for the first match, starting at str+start. Returns the offset into the string where the match begins. The match has length length. If no match was found, returns -1.

Definition at line 168 of file JRegex.C.

References length, NULL, and vmdpcre_exec.


The documentation for this class was generated from the following files:
Generated on Fri Dec 6 02:47:07 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002