No description
Find a file
Ade Attwood fcaf425042 fix: infinite loop when using .* patterns
Summary:

When we are using `.*` patterns, this causes an infinite loop. What happens is
we are adding text to the end and then replacing that. Its only when we are
matching the end of the output string.

We can detect this when the starting point is the same as the end point and the
match is "" (an empty string). If we hit this condition we can get out and
return the output that has been replaced.

Test Plan:

Test in CI
2024-05-29 17:33:47 +01:00
.github/workflows chore: initial commit 2024-05-10 20:53:50 +01:00
src fix: infinite loop when using .* patterns 2024-05-29 17:33:47 +01:00
tests fix: infinite loop when using .* patterns 2024-05-29 17:33:47 +01:00
.gitignore chore: initial commit 2024-05-10 20:53:50 +01:00
Cargo.lock feat: add case preserving search and replace 2024-05-11 19:44:05 +01:00
Cargo.toml feat: add case preserving search and replace 2024-05-11 19:44:05 +01:00
README.md chore: initial commit 2024-05-10 20:53:50 +01:00

Dev Case

A regex search and replace tool for preserving case

Description

Dev Case is a command-line tool built with Rust that simplifies regex search and replace operations while preserving the case of the matched text. It allows developers to efficiently manipulate text files while maintaining the original casing of the content.

Features

  • Regex Search and Replace: Perform search and replace operations using regular expressions.
  • Case Preservation: Maintain the original casing of the matched text during replacement.
  • CLI Interface: Command-line interface for easy integration into development workflows.
  • Built with Rust: Utilizes the performance and safety benefits of the Rust programming language.