Mam takie coś:
[code:1:afbc1c1567]test[/code:1:afbc1c1567]
Jak wyciągnąć ciąg znaków z pomiędzy code? W tym przypadku jest to 'test'.
preg_match('#\[code.*?\](.*?)\[/code.*?\]#m', '[code:1:afbc1c1567]test[/code:1:afbc1c1567]', $matches);
preg_match('#\[code.*?\](.*?)\[/code.*?\]#m', '[code:1:afbc1c1567]test[/code:1:afbc1c1567]', $matches);
$c = '[size=24:731ec5c613][color=#6699ff:731ec5c613]XX[/color:731ec5c613][/size:731ec5c613] [code:1:731ec5c613]http://linkdostrony1.pl [/code:1:731ec5c613]';