logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Regex Replacement - Replace Text Fast with fastmod | Online Free DevTools by Hexmos

Replace text fast with fastmod, a powerful command-line text replacement tool. Perform quick find and replace operations across your codebase. Free online tool, no registration required.

fastmod

A fast partial replacement for the codemod tool, replace and replace all in the whole codebase. Regexes are matched by Rust regex crate. More information: https://github.com/facebookincubator/fastmod.

  • Replace a regex in all files of the current directory, ignoring files on .ignore and .gitignore:

fastmod {{regex}} {{replacement}}

  • Replace a regex in case-insensitive mode in specific files or directories:

fastmod --ignore-case {{regex}} {{replacement}} -- {{path/to/file path/to/directory ...}}

  • Replace a regex in a specific directory in files filtered with a case-insensitive glob pattern:

fastmod {{regex}} {{replacement}} --dir {{path/to/directory}} --iglob {{'**/*.{js,json}'}}

  • Replace for an exact string in .js or JSON files:

fastmod --fixed-strings {{exact_string}} {{replacement}} --extensions {{json,js}}

  • Replace for an exact string without prompt for a confirmation (disables regex):

fastmod --accept-all --fixed-strings {{exact_string}} {{replacement}}

  • Replace for an exact string without prompt for a confirmation, printing changed files:

fastmod --accept-all --print-changed-files --fixed-strings {{exact_string}} {{replacement}}

See Also