# Struct regex_syntax::ExprBuilder [−] [src]

    pub struct ExprBuilder {
        // some fields omitted
    }

A builder for configuring regular expression parsing.

This allows setting the default values of flags and other options, such as the maximum nesting depth.

## Methods

### `impl ExprBuilder`

#### `fn new() -> ExprBuilder`

Create a new builder for configuring expression parsing.

Note that all flags are disabled by default.

#### `fn case_insensitive(self, yes: bool) -> ExprBuilder`

Set the default value for the case insensitive (`i`) flag.

#### `fn multi_line(self, yes: bool) -> ExprBuilder`

Set the default value for the multi-line matching (`m`) flag.

#### `fn dot_matches_new_line(self, yes: bool) -> ExprBuilder`

Set the default value for the any character (`s`) flag.

#### `fn swap_greed(self, yes: bool) -> ExprBuilder`

Set the default value for the greedy swap (`U`) flag.

#### `fn ignore_whitespace(self, yes: bool) -> ExprBuilder`

Set the default value for the ignore whitespace (`x`) flag.

#### `fn unicode(self, yes: bool) -> ExprBuilder`

Set the default value for the Unicode (`u`) flag.

If `yes` is false, then `allow_bytes` is set to true.

#### `fn allow_bytes(self, yes: bool) -> ExprBuilder`

Whether the Unicode flag can be used or not. By default, the flag is enabled but it cannot be toggled.

When disabled, use of the `u` flag will cause the parser to return an error.

#### `fn nest_limit(self, limit: usize) -> ExprBuilder`

Set the nesting limit for regular expression parsing.

Regular expressions that nest more than this limit will result in a `StackExhausted` error.

#### `fn parse(self, s: &str) -> Result<Expr>`

Parse a string as a regular expression using the current configuraiton.

## Trait Implementations

### Derived Implementations

### `impl Debug for ExprBuilder`

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`

### `impl Clone for ExprBuilder`

#### `fn clone(&self) -> ExprBuilder`

#### `fn clone_from(&mut self, source: &Self)`1.0.0

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)