Split a string into array of substrings using regex pattern

string:split_by_regex(STRING $string, STRING $regex_pattern, INT $limit=-1) : ARRAY

# split by is with a space character before or after it
string:split_by_regex('this is nice','/\sis\s/')
#=> [ "this", "nice" ]

Copyright ©2013-2022 SunSed®. All rights reserved.