Replace Word or Substring With Another

Replace a word or substring with another in an event set using the replace() function with a regular expression

Query

logscale
replace(regex=propperties, with=properties)

Introduction

The replace() function can be used to replace each substring of the specified fields value that matches a given regular expression with the given replacement.

In this example, the replace() function is used to correct a spelling mistake.

Step-by-Step

  1. Starting with the source repository events.

  2. logscale
    replace(regex=propperties, with=properties)

    Replaces the word propperties with the word properties.

  3. Event Result set.

Summary and Results

The query is used to correct spelling mistakes in an event set. Changing words or other substrings like this with a regular expression is useful in many situations, where it is necessary to make quick changes of field values.