Skip to content

Latest commit

 

History

History
37 lines (22 loc) · 679 Bytes

File metadata and controls

37 lines (22 loc) · 679 Bytes

replace-string GitHub Action

Replaces strings with regular expressions.

Inputs

pattern

Required Regular expression to match.

string

Required Input string.

replace-with

Required String to use for replacement.

flags

Flags to use when matching. Please refer to MDN for more information.

Outputs

replaced

The replaced string.

Example usage

uses: frabert/replace-string-action@v2
with:
  pattern: 'Hello, (\w+)!'
  string: 'Hello, world!'
  replace-with: 'I greet you, $1!'