У меня есть такая строка:
$str = "{It|This} part, but also {spin|rotation} the words";
Я хочу разделить {It|This и {spin|rotation} на It, This ,spin,rotation с помощью регулярного выражения.
Для этого мне нужно регулярное выражение.
$str = "{It|This} part, but also {spin|rotation} the words";
$pattern =''; // need a pttern here
$arr = preg_split($pattern,$str);
print_r($arr);
Подробнее здесь: https://stackoverflow.com/questions/233 ... n-a-string
Мобильная версия