FindAndReplace

findAndReplace:
  replacements:
  - from: old_text
    to: new_text
    regex: false

Find and replace text within an element.

Description

This action performs one or more textual find-and-replaces within an element. It can be used for plaintext substitutions, or for regex-based replacements, including capture groups and substitutions like $1.

availableFixes:
- name: import AssertJ equivalent
  actions:
  - findAndReplace:
      replacements:
      - from: org.fest.assertions.data.
        to: org.assertj.core.data.
        regex: false
      - from: org.fest.util.
        to: org.assertj.core.util.
        regex: false
availableFixes:
- name: import AssertJ equivalent
  actions:
  - findAndReplace:
      replacements:
      - from: org\.fest\.assertions\.(data)\.
        to: org.assertj.core.$1.
        regex: true
      - from: org\.fest\.(util)\.
        to: org.assertj.core.$1.
        regex: true