Skip to main content


split, ec_explode — split a string into a stringlist


split { delimiter } { string }

ec_explode { delimiter } { string }


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?