splitRegex

splitRegex ( string textToExplode , string|default:',' _regex ) : array

Explode elements of a string into an array

Example


html = '

hello world

hi!!

'
console(splitRegex(html,/(?si)<[^<>]+>/)) //-> [, , hello world, , hi!!]

Parameters

textToExplode

_regex (optional)

the regular expression used as separator