> For the complete documentation index, see [llms.txt](https://docs.helmut.de/helmut4-releases/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.helmut.de/helmut4-releases/helmut4-components/streamdesigner/nodes/actions/misc-21/regex-apply-action.md).

# Regex Apply Action

The **Regex Apply Action** node modifies a string by applying a regular expression (REGEX).

It evaluates the provided string, searches for matches using the defined regex pattern, and replaces the matching characters with a specified replacement value. The corrected string can then be reused in the workflow.

This node is commonly used to normalize names (e.g., project names, filenames, or metadata) so they meet naming conventions or filesystem restrictions.

#### Input Parameters

**String**\
The source string to be processed (for example [{project.name}](/helmut4-releases/helmut4-components/streamdesigner/wildcards/project-related-wildcards-27/project-name.md)).

**Regex**\
The regular expression used to find characters or patterns inside the string.\
Example: `[^a-zA-Z0-9_-]+` finds all characters that are not letters, numbers, underscores, or hyphens.

**Replace With**\
The character(s) that will replace all matches found by the regex.\
If left empty, matching characters will be removed.

<figure><img src="/files/ExUKzhsKHDogJRcnBk6t" alt="" width="351"><figcaption><p>Regex Apply Action</p></figcaption></figure>

#### Output and Wildcards

The processed string is returned as the node result and can be accessed via:

* [{stream.last\_result}](/helmut4-releases/helmut4-components/streamdesigner/wildcards/result-or-return-wildcards-2/stream-last_result.md)
* [{node.result.?}](/helmut4-releases/helmut4-components/streamdesigner/wildcards/result-or-return-wildcards-2/node-result.md)

The value can then be used in later nodes (e.g., folder creation, file naming, or metadata).

#### Behavior

* Reads a string input
* Applies the regex pattern
* Replaces all matches
* Returns the modified string
* Supports asynchronous execution

#### Typical Use Cases

* sanitizing project or folder names
* creating filesystem-safe filenames
* enforcing naming conventions
* removing forbidden characters
* preparing metadata for external systems

#### Example

Source string:

```
My Project: Episode #01 (Final!)
```

Regex:

```
[^a-zA-Z0-9_-]+
```

Replace with:

```
_
```

Result:

```
My_Project_Episode_01_Final_
```

#### Practical Tip

This node is especially useful before **file or folder creation**.\
Many storage systems, playout servers, and external integrations reject special characters — cleaning the string early prevents hard-to-debug downstream workflow failures.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.helmut.de/helmut4-releases/helmut4-components/streamdesigner/nodes/actions/misc-21/regex-apply-action.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
