Until some time ago there was only a replace function in list formatting, which allowed us to replace only the first occurrence of a value in a string.
Recently Microsoft released two new operators for list formatting:
- replaceAll
- split
With the replaceAll we can easily replace with all occurrences of a value in a string as in the example below, where we replace client by customer:
replaceAll has 3 parameters: field, original value, replacement value
replaceAll('fullString','value','replacement')
Sample JSON:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "span",
"txtContent": "=replaceAll([$Title],'client','customer')"
}
Result (used in the Updated Text field):

The split operator accepts as a parameter a string and a value to split it:
=split('fullString','valueToSplit')
It outputs an array with the results, so for example, the below expression:
=split('A client trip to meet...
More About This Author

-
SharePoint and Office 365 Consultant/Developer always trying to get the best from Microsoft stack (Microsoft 365/Azure/Power Platform and related stuff).
Living in Ireland since 2018, I had previously worked in Brazil as a consultant/developer for Office 365, SharePoint and related technologies for almost 10 years.
Array
ModernWorkplace2022.12.07Microsoft Forms: Hiding the ‘Untitled Form’ label in forms without a title
ModernWorkplace2022.12.04Making a Canvas app become Teams & SharePoint theme aware (with the help of the PnP Enhanced Power Apps WebPart)
ModernWorkplace2022.11.19Hiding the New and Upload buttons from a SharePoint document library using JSON list formatting
ModernWorkplace2022.10.25Build powerful Adaptive Card experiences for Teams using Cards for Power Apps