[Solved] PHP RegEx pattern for repeating within the string [duplicate]


by using preg_split:

$str="This is some string <select> this is another string <select var1> another string which can contain special characters <select var2> another variable string <select var1,var2>";

$arr = preg_split('/\<.*?\>/',$str);
print_r($arr);

solved PHP RegEx pattern for repeating within the string [duplicate]