# IRegexpCompiler
<span class="source-link">[[Source]](src/iregex/i_regexp.md#L-0-35)</span>

Parse and compile an I-Regexp pattern string.


```pony
primitive val IRegexpCompiler
```

## Constructors

### create
<span class="source-link">[[Source]](src/iregex/i_regexp.md#L-0-35)</span>


```pony
new val create()
: IRegexpCompiler val^
```

#### Returns

* [IRegexpCompiler](iregex-IRegexpCompiler.md) val^

---

## Public Functions

### parse
<span class="source-link">[[Source]](src/iregex/i_regexp.md#L-0-40)</span>


Parse pattern, returning compiled regexp or error.

```pony
fun box parse(
  pattern: String val)
: (IRegexp val | IRegexpParseError val)
```
#### Parameters

*   pattern: [String](builtin-String.md) val

#### Returns

* ([IRegexp](iregex-IRegexp.md) val | [IRegexpParseError](iregex-IRegexpParseError.md) val)

---

### compile
<span class="source-link">[[Source]](src/iregex/i_regexp.md#L-0-56)</span>


Parse pattern, raising on invalid input.

Convenience wrapper around parse() for call sites that don't need
the error details — discards the IRegexpParseError and raises instead.


```pony
fun box compile(
  pattern: String val)
: IRegexp val ?
```
#### Parameters

*   pattern: [String](builtin-String.md) val

#### Returns

* [IRegexp](iregex-IRegexp.md) val ?

---

### eq
<span class="source-link">[[Source]](src/iregex/i_regexp.md#L-0-40)</span>


```pony
fun box eq(
  that: IRegexpCompiler val)
: Bool val
```
#### Parameters

*   that: [IRegexpCompiler](iregex-IRegexpCompiler.md) val

#### Returns

* [Bool](builtin-Bool.md) val

---

### ne
<span class="source-link">[[Source]](src/iregex/i_regexp.md#L-0-40)</span>


```pony
fun box ne(
  that: IRegexpCompiler val)
: Bool val
```
#### Parameters

*   that: [IRegexpCompiler](iregex-IRegexpCompiler.md) val

#### Returns

* [Bool](builtin-Bool.md) val

---

