Power Query
Search…
published
Introduction
Accessing Data
Action
Binary
Binary Formats
Combiner
Comparer
Cube
Date
Date Time
Date Time Zone
Diagnostics
Duration
Error
Expression
Function
Lines
List
Logical
Metadata
Number
Record
Replacer
Splitter
Table
Text
Character.FromNumber
Character.ToNumber
Guid.From
Json.FromValue
Text.AfterDelimiter
Text.At
Text.BeforeDelimiter
Text.BetweenDelimiters
Text.Clean
Text.Combine
Text.Contains
Text.End
Text.EndsWith
Text.Format
Text.From
Text.FromBinary
Text.Insert
Text.Length
Text.Lower
Text.Middle
Text.NewGuid
Text.PadEnd
Text.PadStart
Text.PositionOf
Text.PositionOfAny
Text.Proper
Text.Range
Text.Remove
Text.RemoveRange
Text.Repeat
Text.Replace
Text.ReplaceRange
Text.Reverse
Text.Select
Text.Split
Text.SplitAny
Text.Start
Text.StartsWith
Text.ToBinary
Text.ToList
Text.Trim
Text.TrimEnd
Text.TrimStart
Text.Upper
Value.FromText
Time
Type
Uri
Values
Powered By GitBook
Text.Replace

Text.Replace

Replaces all occurrences of the given substring in the text.
function (optional text as nullable any, old as text, new as text) as nullable any

Description

Returns the result of replacing all occurrences of text value old in text value text with text value new. This function is case sensitive.

Category

Text.Modification

Examples

Replace every occurrence of "the" in a sentence with "a".
1
Text.Replace("the quick brown fox jumps over the lazy dog", "the", "a")
Copied!
"a quick brown fox jumps over a lazy dog"
Previous
Text.Repeat
Next
Text.ReplaceRange
Last modified 3yr ago
Copy link
Contents
Text.Replace
Description
Category
Examples