---
title: Regex - replace part of the string
timestamp: 2024-02-13T17:20:01
author: szabgab
published: true
description: Regular expression are powerful.
tags:
    - Regex
    - Captures
    - replace_all
todo:
    - TODO
---


## Dependencies

{% include file="examples/regex-replace-text-by-text/Cargo.toml" %}


## Full code

{% include file="examples/regex-replace-text-by-text/src/main.rs" %}

