Docs
API 1.39
Status
DSL

Transforms

Text transforms a field applies before its value is parsed.

transforms is a list applied in order. An entry is a name, or an object with one key and its arguments.

TransformTypeDescription
trimnameRemoves leading and trailing whitespace.
lowercasenameConverts the string to lowercase.
uppercasenameConverts the string to uppercase.
strip_htmlnameRemoves HTML markup from the string and decodes entities.
firstnameKeeps the first line of the string.
lastnameKeeps the last line of the string.
replaceobjectReplaces every match of a regular expression.
replace.patternstringThe regular expression to replace.
replace.withstringThe replacement string.
splitobjectSplits the string on a separator and keeps one part.
split.indexintegerThe 0-based index of the part to keep; a negative index counts from the end. An index the string does not have is a parse failure, handled by on_invalid.
split.sepstringThe separator, at least one character.
joinobjectJoins the lines of the string into one line.
join.sepstringThe string placed where each line break was.
prefixstringAdds the given string to the start.
suffixstringAdds the given string to the end.
sliceobjectKeeps the characters from start up to end, as JavaScript slice does, so negative indices count from the end.
slice.endintegerThe index to stop before. Without it, the slice runs to the end.
slice.startintegerThe index of the first character to keep.

Was this page helpful?