String nodes
String nodes build, test, and split text, and read values out of JSON. See how nodes work for how to read the diagrams below.
Format String
Builds text from a template with numbered placeholders.
- Template
- Text with {0}, {1}, … placeholders. Can span several lines. Default Value: {0}.
- Argument Count
- Number of Arg inputs, 1 to 20. Default 4.
- Output Format
- None, To Uppercase, or To Lowercase. Default None.
For example, the template {0} redeemed {1} with Arg 0 set to Alex and Arg 1
set to Shock gives Alex redeemed Shock. Unconnected arguments are left
blank. If the template is invalid, for example it uses {5} with only four
arguments, Result is the template unchanged.
Regex Match
Tests text against a regular expression.
- Pattern
- A .NET regular expression. Default .*
- Ignore Case
- Default off.
An invalid pattern, or one that takes longer than a second to run, gives Matches false.
String Compare
Compares two pieces of text.
- Mode
- Equals, Contains, Starts With, or Ends With. Default Equals.
- Ignore Case
- Default on.
Contains, Starts With, and Ends With check both directions: Contains is true if A contains B or B contains A. Because every text contains empty text, these modes also return true when either input is empty.
String Split
Splits text into a list wherever a delimiter appears.
- Delimiter
- Default , (comma).
- Ignore Case
- Default on.
With Ignore Case on, the input is lowercased before splitting, so the parts in Result are lowercase too. Turn it off to keep the original capitalization. Empty parts and spaces around parts are kept. An empty delimiter returns the whole input as a single item.
JSON Parse
Turns JSON text into a value other nodes can read.
- Allow Non-String Input
- Pass values that are not text straight through to Value instead of failing. Default on.
Use JSON Path Get to read a field from the parsed value.
JSON Path Get
Reads one value out of JSON using a path.
- Path
- Default $, the whole value.
- Default Value
- Sent to Value when the path is missing. Numbers, true/false, and JSON are converted.
Paths use dots for fields and brackets for list positions, for example
$.user.name or items[0].id. The leading $ is optional. Text, numbers, and
true/false come out as plain values; objects and lists stay as JSON, so you can
chain another JSON Path Get to read deeper.