# Poco::MongoDB

# class RegularExpression

Library: MongoDB
Package: MongoDB
Header: Poco/MongoDB/RegularExpression.h

## Description

Represents a regular expression in BSON format.

## Member Summary

Member Functions: createRE, getOptions, getPattern, setOptions, setPattern

## Types

### Ptr

typedef SharedPtr < RegularExpression > Ptr;

## Constructors

### RegularExpression

RegularExpression();

Creates an empty RegularExpression.

### RegularExpression

RegularExpression(
const std::string & pattern,
const std::string & options
);

Creates a RegularExpression using the given pattern and options.

## Destructor

### ~RegularExpression

virtual ~RegularExpression();

Destroys the RegularExpression.

## Member Functions

### createRE

SharedPtr < Poco::RegularExpression > createRE() const;

Tries to create a Poco::RegularExpression from the MongoDB regular expression.

### getOptions

std::string getOptions() const;

Returns the options string.

### getPattern

std::string getPattern() const;

Returns the pattern.

### setOptions

void setOptions(
const std::string & options
);

Sets the options string.

### setPattern

void setPattern(
const std::string & pattern
);

Sets the pattern.