{"id":25387199,"url":"https://github.com/dreitier/conditional-regex-search-and-replace-action","last_synced_at":"2026-04-29T17:05:16.810Z","repository":{"id":65159587,"uuid":"565133147","full_name":"dreitier/conditional-regex-search-and-replace-action","owner":"dreitier","description":"Executes conditional search and replace operations on a set of files. Strings are replaced by matching regular expressions.","archived":false,"fork":false,"pushed_at":"2023-02-10T12:30:48.000Z","size":198,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-15T11:39:08.997Z","etag":null,"topics":["argocd","continuous-delivery","continuous-deployment","continuous-integration","github-action","github-actions","gitops","glob","regex","regular-expression","search-and-replace","structure"],"latest_commit_sha":null,"homepage":"https://dreitier.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dreitier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-12T12:51:58.000Z","updated_at":"2024-02-20T20:44:53.000Z","dependencies_parsed_at":"2025-02-15T11:34:26.743Z","dependency_job_id":"75cdaba7-0ae0-4987-96c4-603e91991814","html_url":"https://github.com/dreitier/conditional-regex-search-and-replace-action","commit_stats":{"total_commits":56,"total_committers":2,"mean_commits":28.0,"dds":"0.017857142857142905","last_synced_commit":"fe74eaefd3ceb7262c80a5f153c26353001e2da0"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreitier%2Fconditional-regex-search-and-replace-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreitier%2Fconditional-regex-search-and-replace-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreitier%2Fconditional-regex-search-and-replace-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreitier%2Fconditional-regex-search-and-replace-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dreitier","download_url":"https://codeload.github.com/dreitier/conditional-regex-search-and-replace-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248096056,"owners_count":21046969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argocd","continuous-delivery","continuous-deployment","continuous-integration","github-action","github-actions","gitops","glob","regex","regular-expression","search-and-replace","structure"],"created_at":"2025-02-15T11:34:18.321Z","updated_at":"2026-04-29T17:05:11.770Z","avatar_url":"https://github.com/dreitier.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# conditional-regex-search-and-replace-action\nThis GitHub action executes conditional search and replace operations on multiple files. Strings in files are replaced, if they match a given regular expressions.\n\nOriginally, this action has been created to update strings - like Docker image tag and Git branches - in Helm charts and Kustomize templates inside of Git repositories used for GitOps projects.\nWhen using the [environment-per-folder strategy](https://dreitier.com/knowledge-base/continuous-delivery-and-deployment/using-environment-per-folder-directory-structure-for-gitops-projects-with-argo-cd-and-helm), updating the designated file for one or multiple environments can be cumbersome.\nIf you want to use this action indeed for updating GitOps repositories, please look at [this article](https://dreitier.com/knowledge-base/continuous-delivery-and-deployment/promoting-new-docker-images-to-helm-charts-in-github-repositories-with-github-actions) on how to execute it with `repository_dispatch`.\n\n## Usage\n\n```yaml\nuses: dreitier/conditional-regex-search-and-replace-action\nenv:\nwith:\n  mappings: \"docker_image_tag==main.* {THEN_UPDATE_FILES} **dev/values.yaml=docker_image_tag_regex\"\n  docker_image_tag: \"${{ github.sha }}\"\n  docker_image_tag_regex: \"imageTag: \\\\\\\"(?\u003cdocker_image_tag\u003e.*)\\\\\\\"\"\n```\n\n### Mandatory arguments\n\n| Argument | Description |\n| --- | --- |\n| `mappings` | DSL to define search-and-replace operations, see below |\n\n### Optional arguments\n| Argument                          | Default  | Description                                                                                                                                             |\n|-----------------------------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `directory`                       | `$CWD`   | Directory, in which to operate. By default, the current working directory is used.                                                                      |\n| `dump`                            | `\u003cnone\u003e` | If `1`, it dumps the provided configuration                                                                                                             | \n| `if_no_match_fail`                | `0`      | If the action has not modified any file and `if_no_match_fail` is `1`, it will fail with exit code `3`                                                  |\n| `if_well_known_vars_missing_fail` | `0`      | If `1`, it fails with exit code `2` if none of docker_image_tag, git_branch or git_tag is provided                                                      |\n| `updated_file_suffix`             | `\u003cnone\u003e` | If set, any changes will be written to another file the path of the original file and that suffix                                                       |\n| `register_custom_regexes`         | `\u003cnone\u003e` | A comma-separated list of custom regular expressions to register                                                                                        |\n| `register_custom_variables`       | `\u003cnone\u003e` | A comma-separated list of custom variables to register                                                                                                  |\n| `commit`                          | `0`      | If there has been any modified files (see below, `outputs.total_modified_files`), it will commit the changes to the Git repository                      |\n| `commit_template`                 | `\u003cnone\u003e` | Template to use for the commit message. You can use the [Blade template engine](https://laravel.com/docs/9.x/blade) to dynamically specify the message. |\n| `committer_name`                  | `\u003cnone\u003e` | Name of committer, only relevant if `commit` is present                                                                                                 |\n| `committer_email`                 | `\u003cnone\u003e` | E-mail of committer, only relevant if `commit` is present                                                                                               |\n| `skip-regexes-autodetect`         | `0`      | Skip auto-detection of regexes for environment variables ending with `_REGEX`                                                                           |\n| `skip-variables-autodetect`       | `0`      | Skip auto-detection of variables for environment variables ending with `_VAR`                                                                           |\n\n### Well-known variables and regular expressions\nDue the original requirement of this action, you can use the following built-in variables:\n\n| Argument | Description |\n| --- | --- |\n| `__always__` and `__true__` | Both variables are automatically set to `1` |\n| `docker_image_tag` | Docker image tag created by upstream repository |\n| `docker_image_tag_regex` | Regular expression to modify occurences of Docker image tags in globbed files |\n| `git_tag` | Git tag created by upstream repository |\n| `git_tag_regex` | Regular expression to modify occurences of Git tags in globbed files |\n| `git_branch` | Git branch modified in upstream repository |\n| `git_branch_regex` | Regular expression to modify occurences of Git branch in globbed files |\n\nThere is __no__ need to use `docker_image_tag_regex`, `git_tag_regex` and `git_branch_regex`, those regular expressions are automatically registered. You can register additional regular expressions as you like.\n\n#### Registering additional regular expressions\nAdditional regular expressions are automatically detected if the environment variable has the suffix (`_REGEX`). If your regular expression has not that suffix, you can use the option `register_custom_regexes`:\n\n```yaml\nuses: dreitier/conditional-regex-search-and-replace-action\nwith:\n  # ...\n  register_custom_regexes: check_for_customer_myregex\nenv:\n  # this one is automatically detected\n  MY_CUSTOM_REGEX: \"/a: b/\"\n  # this is detected by using `register_custom_regexes`\n  CHECK_FOR_CUSTOMER_MYREGEX: \"/customer: (\u003ccustomer_number\u003e\\d+)/\"\n```\n\nTo register multiple regular expressions without the `_REGEX` suffix, use a comma (`,`) for separation:\n\n```yaml\nuses: dreitier/conditional-regex-search-and-replace-action\nwith:\n  # ...\n  register_custom_regexes: check_for_customer_myregex, project_id_myregex\nenv:\n  CHECK_FOR_CUSTOMER_MYREGEX: \"/customer: (?\u003ccustomer_number\u003e\\d+)/\"\n  PROJECT_MYID_REGEX: \"/project: (?\u003cproject_id\u003e\\d+)/\"\n```\n\n\n#### Registering additional variables\nTo provide additional variables aside from `docker_image_tag`, `git_tag` and `git_branch` you have to register those variables.\n- Variables are automatically detected for environment variables having the suffix `_VAR`.\n- If your variable cannot have the suffix `_VAR`, you have to use `register_custom_variables`.\n\nFor referencing the `customer_number` variable of the previous section, you can use either:\n\n```yaml\nuses: dreitier/conditional-regex-search-and-replace-action\nwith:\n  # ...\nenv:\n  # this one is automatically detected by using the _VAR suffix.\n  CUSTOMER_NUMBER_VAR: \"555\"\n```\n\nor\n\n```yaml\nuses: dreitier/conditional-regex-search-and-replace-action\nwith:\n  # ...\n  register_custom_variables: customer_number\nenv:\n  # custom registered variable\n  CUSTOMER_NUMBER: \"555\"\n```\n\nIn both cases, you can reference the variable later on with `customer_number`. The `_VAR` suffix is removed.\n\nTo register multiple variables without the `_VAR` suffix, use a comma (`,`) for separation:\n\n```yaml\nuses: dreitier/conditional-regex-search-and-replace-action\nwith:\n  # ...\n  register_custom_variables: customer_number, project_id\nenv:\n  CUSTOMER_NUMBER: \"555\"\n  PROJECT_ID: \"5550555\n```\n\n#### Git commit message templates\nWhen using `commit_template`, you can either put in some static string or you can use the [Blade template engine](https://laravel.com/docs/9.x/blade) to dynamically specify the message.\nEach of the well-known and custom variables is passed as variable to the template. If you have a custom variable `customer_number`, you can access the value with `{{ $customer_number }}`.\n\nUse a static string:\n```yaml\nuses: dreitier/conditional-regex-search-and-replace-action\nwith:\n  # ...\n  commit_template: 'A new version has been born.'\n```\n\nReference a well-known variable:\n```yaml\nuses: dreitier/conditional-regex-search-and-replace-action\nwith:\n  # ...\n  docker_image_tag: '1.0.0'\n  commit_template: 'chore: Update to Docker image tag {{ $docker_image_tag }}'\n```\n\nReference a custom variable:\n```yaml\nuses: dreitier/conditional-regex-search-and-replace-action\nwith:\n  # ...\n  docker_image_tag: '1.0.0'\n  commit_template: 'chore: Update to Docker image tag {{ $docker_image_tag } for customer {{ $customer_number))'\nenv:\n    CUSTOMER_NUMBER_VAR: \"555\" # or set it to an empty string\n```\n\nExpressions:\n```yaml\nuses: dreitier/conditional-regex-search-and-replace-action\nwith:\n  # ...\n  docker_image_tag: '1.0.0'\n  commit_template: 'chore: Update to Docker image tag {{ $docker_image_tag }}@if(!empty($customer_number)) for customer {{ $customer_number }}@endif'\nenv:\n    CUSTOMER_NUMBER_VAR: \"\" # or a non-empty string\n```\n\n#### Mappings\nMappings specify, if one or multiple regular expressions match, how other regular expressions are applied. It's basically\n\n```yaml\nuses: dreitier/conditional-regex-search-and-replace-action\nwith:\n  mappings: '\u003cif_first_regex_match\u003e OR \u003cif_second_regex_match\u003e {THEN_UPDATE_FILES} \u003cchange_first_file_group\u003e=\u003capply_regex_1\u003e {AND} \u003cchange_second_file_group\u003e=\u003capply_regex_1\u003e\u0026\u003capply_regex_2\u003e'\n```\n\nIn each regular expression to apply, you have access to all well-known and custom variables through named capturing groups:\n\n```yaml\nuses: dreitier/conditional-regex-search-and-replace-action\n  docker_image_tag: '1.0.0'\n  docker_image_tag_regex: 'imageTag: \\\"(?\u003cdocker_image_tag).*)\\\"'\n  mappings: 'docker_image_tag==.* {THEN_UPDATE_FILES} **.yaml=docker_image_tag_regex\u0026my_regex'\nenv:\n  # auto-detect both variable and regex\n  CUSTOMER_NUMBER_VAR: \"555\"\n  MY_REGEX: '.*customer: \\\"(?\u003ccustomer_number\u003e.*)\\\".*'\n```\n\n### Outputs\n\n| Output | Default | Description                                        |\n| --- | --- |----------------------------------------------------|\n| `total_modified_files` | `0` | Number of modified (target) files.                 |\n| `$your_variable` | `` | Any of your provded well-known or custom variables |\n\nYou can reference the output variables in your GitHub Action workflow like this:\n\n```yaml\njobs:\n  my_job_with_dedicated_commit_and_push:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Update repository  \n        id: search_and_replace_op\n        uses: dreitier/conditional-regex-search-and-replace-action\n        with:\n          # ...\n\n      # instead of using this action's commit hook, we use the more flexible EndBug/add-and-commit if any file has been modified\n      - name: Commit and push\n        if: ${{ steps.search_and_replace.outputs.total_modified_files \u003e= 1 }}\n        uses: EndBug/add-and-commit@v7\n        with:\n          author_name: build@internalcom\n          author_email: build@internal\n          message: \"There have been {{ steps.search_and_replace.outputs.total_modified_files }} modified files\"\n```\n\nTo access e.g. the `customer_number` from before\n\n```yaml\njobs:\n  my_job_with_dedicated_commit_and_push:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Update repository\n        id: search_and_replace_op\n        uses: dreitier/conditional-regex-search-and-replace-action\n        with:\n          docker_image_tag: '1.0.0'\n          # ...\n        env:\n            CUSTOMER_NUMBER_VAR: \"555\"\n\n      - name: Commit and push\n        if: ${{ steps.search_and_replace.outputs.total_modified_files \u003e= 1 }}\n        uses: EndBug/add-and-commit@v7\n        with:\n          author_name: build@internal\n          author_email: build@internal\n          message: \"Customer number {{ steps.search_and_replace.outputs.customer_number }} has {{ steps.search_and_replace.outputs.total_modified_files }} modified files for tag {{ steps.search_and_replace.outputs.docker_image_tag }}\"\n```\n\n## Examples\n### Updating strings in multiple files\n\nIn a folder structure like this\n```\n├── asia\n│   ├── dev\n│   │   ├── values.yaml\n│   └── prod\n│       ├── values.yaml\n├── eu\n│   ├── dev\n│   │   └── values.yaml\n│   └── prod\n```\n\nthe files `eu/dev/values.yaml` and `asia/dev/values.yaml` have be modified. The original content of both `values.yaml` files looks like this:\n\n```yaml\ncustom_parameter: custom_value\nimageTag: v0.1.0\nother_parameter: other_custom_value\n```\n\nWe want to update the `imageTag` value in both `values.yaml` files from `v0.1.0` to `v0.2.0`:\n\n```yaml\nuses: dreitier/conditional-regex-search-and-replace-action\nenv:\nwith:\n  mappings: \"docker_image_tag==v.* {THEN_UPDATE_FILES} **dev/values.yaml=docker_image_tag_regex\"\n  docker_image_tag: \"v0.2.0\"\n  docker_image_tag_regex: \"imageTag: \\\\\\\"(?\u003cdocker_image_tag\u003e.*)\\\\\\\"\"\n```\n\nAfter running `conditional-regex-search-and-replace-action`, both files will look like this:\n```yaml\ncustom_parameter: custom_value\nimageTag: v0.2.0\nother_parameter: other_custom_value\n```\n\n#### Transformed into pseudo code\nSometimes it's easier to read pseudo code instead of skimming through YAML files. The above YAML's definition can be read as\n```\nif $docker_image_tag =~ /v.*/ then\n    $files = glob_files_with_matcher(\"**dev/values.yaml\")\n    \n    foreach $files as $file\n        foreach $line in $file\n            if $line =~ /imageTag: \\\"(?\u003cdocker_image_tag\u003e.*)\\\"/ then\n                $line = \"imageTag: \\\"$docker_image_tag\\\"\"\n                write_line_to_file($file, $line)\n            fi\n        endforeach\n    endforeach\nendif\n```\n\n### Do not check a regex for a given pattern\nIf you do not have to check one or multiple known variable for a regex, you can simply use the well-known variables `__always__` or `__true__`:\n\n```yaml\nwith:\n  mappings: \"__always__ {THEN_UPDATE_FILES} **dev/values.yaml=docker_image_tag_regex\"\n  docker_image_tag: \"v0.2.0\"\n  docker_image_tag_regex: \"imageTag: \\\\\\\"(?\u003cdocker_image_tag\u003e.*)\\\\\\\"\"\n```\n\nBy using `__always__` or `__true__` the replacement will be applied, regardless of one of the variable's value.\n\n### Updating multiple values at the same time\nIf you need to apply multiple regexes at the same time, you can chain those regexes with:\n\n```yaml\nwith:\n  mappings: \"docker_image_tag==v.* {THEN_UPDATE_FILES} **dev/values.yaml=docker_image_tag_regex\u0026git_branch_regex\"\n  git_branch: \"feature/165-integrate-kerberos-auth\"\n  git_branch_regex: \"branch: \\\\\\\"(?\u003cgit_branch\u003e.*)\\\\\\\"\"\n  docker_image_tag: \"v0.2.0\"\n  docker_image_tag_regex: \"imageTag: \\\\\\\"(?\u003cdocker_image_tag\u003e.*)\\\\\\\"\"\n```\n\nA `values.yaml` of this:\n```yaml\ncustom_parameter: custom_value\nimageTag: v0.2.0\nbranch: old-branch\n```\n\nwill be transformed into this:\n```yaml\ncustom_parameter: custom_value\nimageTag: v0.2.0\nbranch: feature/165-integrate-kerberos-auth\n```\n\n#### Transformed into pseudo code\n```\nif $docker_image_tag =~ /v.*/ then\n    $files = glob_files_with_matcher(\"**dev/values.yaml\")\n    \n    foreach $files as $file\n        foreach $line in $file\n            if $line =~ /imageTag: \\\"(?\u003cdocker_image_tag\u003e.*)\\\"/ then\n                $line = \"imageTag: \\\"$docker_image_tag\\\"\"\n                write_line_to_file($file, $line)\n            fi\n            if $line =~ /branch: \\\"(?\u003cgit_branch\u003e.*)\\\"/ then\n                $line = \"git_branch: \\\"$git_branch\\\"\"\n                write_line_to_file($file, $line)\n            fi\n        endforeach\n    endforeach\nendif\n```\n\n### Check, if at least one variable matches\nSometimes you want to update files if at least one of multiple conditions is valid. `mappings` support a simple `{OR}` operator.\n\n```yaml\nwith:\n  mappings: \"docker_image_tag==v.* {OR} git_branch==feature\\/.* {THEN_UPDATE_FILES} **dev/values.yaml=docker_image_tag_regex\u0026git_branch_regex\"\n  git_branch: \"feature/165-integrate-kerberos-auth\"\n  git_branch_regex: \"branch: \\\\\\\"(?\u003cgit_branch\u003e.*)\\\\\\\"\"\n  docker_image_tag: \"latest\"\n  docker_image_tag_regex: \"imageTag: \\\\\\\"(?\u003cdocker_image_tag\u003e.*)\\\\\\\"\"\n```\n\n#### Transformed into pseudo code\n```\nif $docker_image_tag =~ /v.*/ or $git_branch =~ /feature\\/.*/ then\n    $files = glob_files_with_matcher(\"**dev/values.yaml\")\n    \n    foreach $files as $file\n        foreach $line in $file\n            if $line =~ /imageTag: \\\"(?\u003cdocker_image_tag\u003e.*)\\\"/ then\n                $line = \"imageTag: \\\"$docker_image_tag\\\"\"\n                write_line_to_file($file, $line)\n            fi\n            if $line =~ /branch: \\\"(?\u003cgit_branch\u003e.*)\\\"/ then\n                $line = \"git_branch: \\\"$git_branch\\\"\"\n                write_line_to_file($file, $line)\n            fi\n        endforeach\n    endforeach\nendif\n```\n\n### Multiple mappings\nThis action's DSL for defining mappings does __not__ feature a `{AND}` condition in the left-hand part of `{THEN_UPDATE_FILES}`. Instead, you can chain multiple mappings together. Use De Morgan's law for complex conditions ;-)\nEach of those mappings will be separately evaluated:\n\n```yaml\nwith:\n  mappings: \"docker_image_tag==v.* {THEN_UPDATE_FILES} **dev/values.yaml=docker_image_tag_regex {NEXT_MAPPING} git_branch==feature\\/.* {THEN_UPDATE_FILES} **dev/values.yaml=git_branch_regex\"\n  git_branch: \"feature/165-integrate-kerberos-auth\"\n  git_branch_regex: \"branch: \\\\\\\"(?\u003cgit_branch\u003e.*)\\\\\\\"\"\n  docker_image_tag: \"v2.0.0\"\n  docker_image_tag_regex: \"imageTag: \\\\\\\"(?\u003cdocker_image_tag\u003e.*)\\\\\\\"\"\n```\n\n#### Transformed into pseudo code\n```\nif $docker_image_tag =~ /v.*/ then\n    $files = glob_files_with_matcher(\"**dev/values.yaml\")\n    \n    foreach $files as $file\n        foreach $line in $file\n            if $line =~ /imageTag: \\\"(?\u003cdocker_image_tag\u003e.*)\\\"/ then\n                $line = \"imageTag: \\\"$docker_image_tag\\\"\"\n                write_line_to_file($file, $line)\n            fi\n        endforeach\n    endforeach\nendif\n\nif $git_branch =~ /feature\\/.*/ then\n    $files = glob_files_with_matcher(\"**dev/values.yaml\")\n    \n    foreach $files as $file\n        foreach $line in $file\n            if $line =~ /branch: \\\"(?\u003cgit_branch\u003e.*)\\\"/ then\n                $line = \"git_branch: \\\"$git_branch\\\"\"\n                write_line_to_file($file, $line)\n            fi\n        endforeach\n    endforeach\nendif\n```\n\n## FAQ\n### Why not using something more GitOps-esk like Argo CD Image Updater?\nUsing Argo CD Image Updater is totally fine but might have some drawbacks:\n- By default, Argo CD Image Updater checks the Docker registries every 2 minutes. There might be a good chance of hitting API request limits, e.g. with Docker Hub.\n- Setting up Argo CD Image Updater might be difficult, depending upon the environment.\n- Argo CD Image Updater does not support complex search-and-replace operations.\n\nWhen using `conditional-regex-search-and-replace-action`, you can either configure Webhooks in your GitOps repository to notify Argo CD or let Argo CD pull the latest version.\n\n### Why are you not using Bash/$your_favorite_language_here for this action?\nBefore introducing this action, I've developed a Bash script for updating various GitOps repositories. Different projects had different requirements: The Bash script was no longer maintainable.\nUsing Laravel Zero and Pest for developing testable GitHub Actions looks fine to me.\n\n### But I can do everything with awk \u0026 sed.\nJust keep using `awk` \u0026 `sed`, it's fine!\n\n### Why looks the DSL like it does?\nDue to the nature of complexity and how parameters are passed from the GitHub workflow to single actions, it was the first approach I came up with.\nI also thought about using Blade templates for doing the mapping stuff.\n\n## DSL spec\n\n```\nnext_mapping            = \"{NEXT_MAPPING}\"\nif_match_then_execute   = \"{THEN_UPDATE_FILES}\"\nglob                    = $valid_glob\nregex                   = $valid_quoted_regex\nvariable_reference      = (lower_case_chars | digits | '_')+\nregex_reference         = (lower_case_chars | digits | '_')+\n\nmatches                 = \"==\"\nmatcher                 = variable_reference (matches regex)?\nor_matcher              = \"{OR}\"\nmatchers                = matcher (or_matcher matcher)+\n\nregex_references        = regex_reference ('\u0026' regex_reference)+\nassign_to               = '='\nreplacer                = glob assign_to regex_references\nreplacers               = replacer (and_replacer replacer)+\nand_replacer            = \"{AND}\"\n\nmapping                 = matchers if_match_then_execute replacers\nmultiple_mappings       = mapping (next_mapping mapping)+\n```\n\n## Support\nThis software is provided as-is. You can open an issue in GitHub's issue tracker at any time. But we can't promise to get it fixed in the near future. If you need professionally support, consulting or a dedicated feature, please get in contact with us through [our website](https://dreitier.com).\n\n## Contribution\nFeel free to provide a pull request.\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreitier%2Fconditional-regex-search-and-replace-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdreitier%2Fconditional-regex-search-and-replace-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreitier%2Fconditional-regex-search-and-replace-action/lists"}