response_body_regex_replace
> Documentation > Docs > INFINI Gateway > References > Online Filter > response_body_regex_replace

response_body_regex_replace #

Description #

The response_body_regex_replace filter is used to replace string content in a response by using a regular expression.

Configuration Example #

A simple example is as follows:

flow:
  - name: test
    filter:
      - echo:
          message: "hello infini\n"
      - response_body_regex_replace:
          pattern: infini
          to: world

The result output of the preceding example is hello world.

Parameter Description #

NameTypeDescription
patternstringRegular expression used for matching and replacement
tostringTarget string used for replacement