0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Static Public Member Functions | List of all members
Hypertable::Regex Class Reference

Provides utility functions for regular expressions. More...

#include <Regex.h>

Static Public Member Functions

static bool extract_prefix (const char *regex, size_t regex_len, const char **output, size_t *output_len, DynamicBuffer &buf)
 Extracts a fixed prefix from regular expression. More...
 

Detailed Description

Provides utility functions for regular expressions.

Definition at line 38 of file Regex.h.

Member Function Documentation

bool Regex::extract_prefix ( const char *  regex,
size_t  regex_len,
const char **  output,
size_t *  output_len,
DynamicBuffer buf 
)
static

Extracts a fixed prefix from regular expression.

This function extracts a fixed prefix from the regular expression defined by regex and regex_len. A candidate string which maches the regex implies that the string begins with the fixed prefix. A fixed prefix can only be extacted from a regular expression that begins with the '^' character and is followed by some number of non-qualified, non-meta characters.

Parameters
regexPointer to regular expression
regex_lenLength of regular expression
outputAddress of output pointer to beginning of prefix
output_lenAddress of output length to hold length of prefix
bufBuffer to hold prefix if expansion was required
Returns
true if a valid prefix was extracted, false otherwise.

Definition at line 33 of file Regex.cc.


The documentation for this class was generated from the following files: