You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

split_regex()

Usage

split_regex(string, separator)

Description
Uses the given separator to split the given string into a collection of strings. This is the opposite of join().

The default separator is a regular expression which splits the string at any of the following characters:

, ; <whitespace>

The optional second parameter is used as regex. To use a literal string as separator, see split().

Examples

Any of these expressions

${split('one,two,three')}
${split('one;two;three')}
${split('one two three')}
${split('one::two::three', '::')}
${split('one.two.three', '\\.')}

results in

[one, two, three]

Search results for "split_regex()"

split_regex()

Uses the given separator to split the given string into a collection of strings. This is the opposite of join().
The default separator is a regular expression which splits the string at any of the following characters: ,;(whitespace)
The optional second parameter is used as regex. To use a literal string as separator, see split().

split_regex(string, separator)