> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Regex Field Replacement

> Index pipeline stage configuration specifications

[localhost link]: http://localhost:3000/docs/lucidworks-search/09-developer-documentation/config-specs/index-pipeline-stages/regex-field-replacement

[mintlify link]: https://doc.lucidworks.com/docs/lucidworks-search/09-developer-documentation/config-specs/index-pipeline-stages/regex-field-replacement.md

[old doc.lw link]: https://doc.lucidworks.com/managed-fusion/5.9/iktngi.md

The Regex Field Replacement index stage lets you match against a source field and append or overwrite that field or another one with a replacement string. It uses the
[java.util.regex](https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html) library.

One notable feature is support for flags in the prefix of the pattern, such as `(?iu)\w+` where the `i` flag means case-insensitive and `u` means Unicode-aware case folding. You can also configure the desired behavior when there is no match. Additionally, you can use capture groups in your replacement configuration using `$1` to denote the first capture group.

> [card] Key questions to get you started
>
> Powered by Lucidworks Agent Studio

## Configuration

> [!TIP]
>
> When entering configuration values in the UI, use *unescaped* characters, such as `\t` for the tab character. When entering configuration values in the API, use *escaped* characters, such as `\\t` for the tab character.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.