Duaer

Expressions and code

String transformation methods in Duaer

In a Duaer expression, string methods change case, slice text, test emails and URLs, and encode or decode base64 and URLs.

Test and extract

  • isEmpty(), isNotEmpty(), and length test emptiness and length.
  • includes(text), startsWith(text), indexOf(text), search(text), and match(pattern) test containment, a prefix, a position, a search, and a regular expression.
  • isEmail(), isUrl(), isDomain(), and isNumeric() test whether the string looks like an email, a URL, a domain, or a number.
  • extractEmail(), extractUrl(), extractUrlPath(), and extractDomain() pull an email, URL, path, or domain out of a longer string.

Rewrite and convert

  • toLowerCase(), toUpperCase(), toTitleCase(), toSentenceCase(), and toSnakeCase() change case or write snake_case.
  • trim() drops whitespace at both ends. replace(find, replacement) and replaceAll(find, replacement) replace text. replaceSpecialChars() handles special characters. removeMarkdown() and removeTags() strip Markdown or HTML tags.
  • slice(start, end), substring(start, end), split(separator), and concat(other) cut, split, and join.
  • quote() wraps the string in quotes.
  • base64Encode(), base64Decode(), urlEncode(), urlDecode(), and hash() encode, decode, and hash.
  • parseJson() parses a JSON string into a value. toJsonString() writes JSON again.
  • toNumber(), toBoolean(), and toDateTime() convert to a number, a boolean, or a DateTime.
{{ $json.note.extractEmail() }}

Questions

What does extractEmail do in Duaer?

In a Duaer expression, it pulls an email out of a string. extractUrl(), extractUrlPath(), and extractDomain() do the same for a URL, path, and domain. isEmail() only tests the shape—it does not extract.

How does a string become JSON in Duaer?

In a Duaer expression, parseJson() parses a JSON string into an object or array. toJsonString() writes JSON again. toNumber(), toBoolean(), and toDateTime() convert to a number, boolean, or DateTime.

In this section