Skip to main content

Name

split, ec_explode — split a string into a stringlist

Synopsis

split { delimiter } { string }

ec_explode { delimiter } { string }

Description

split uses its first argument as a delimiter to explode a given string into a stringlist.

For example, to split an IP address into its component octets, we might do something like this:

($a, $b, $c, $d) = split "." "%{spfv1:i}";

ec_log "the IP address is ${a}.${b}.${c}.${d}";
Was this page helpful?