Argus231
12.01.2010, 11:46:03
Ich habe schon lange da rumgebastelt.
$test1 läuft so wie es sein muss.
$test2 bringt wegen dem YOYOY
Hat einer eine Ahnung wie man den regex anpassen muss damit er $test2 auch schluckt?
<?php
$test = "YOYOY";
$test2 = "','index.php?page=Thread&postID=350583#post350583']YOYOY";
preg_match_all('(\[quote=\'(.*?)\'\]([^\[]*)\[/quote\])', $test, $ausgabe, PREG_PATTERN_ORDER);
echo '<pre>'; print_r($ausgabe); echo '</pre>';
preg_match_all('(\[quote=\'(.*?)\'\]([^\[]*)\[/quote\])', $test2, $ausgabe, PREG_PATTERN_ORDER);
echo '<pre>'; print_r($ausgabe); echo '</pre>';
Array
(
[0] => Array
(
)
[1] => Array
(
)
[2] => Array
(
)
)
Array
(
[0] => Array
(
[0] => ','index.php?page=Thread&postID=350583#post350583']YOYOY
)
[1] => Array
(
[0] => elgringo [Gast]','index.php?page=Thread&postID=350583#post350583
)
[2] => Array
(
[0] => YOYOY
)
)
?>
$test1 läuft so wie es sein muss.
$test2 bringt wegen dem YOYOY
Hat einer eine Ahnung wie man den regex anpassen muss damit er $test2 auch schluckt?
<?php
$test = "YOYOY";
$test2 = "','index.php?page=Thread&postID=350583#post350583']YOYOY";
preg_match_all('(\[quote=\'(.*?)\'\]([^\[]*)\[/quote\])', $test, $ausgabe, PREG_PATTERN_ORDER);
echo '<pre>'; print_r($ausgabe); echo '</pre>';
preg_match_all('(\[quote=\'(.*?)\'\]([^\[]*)\[/quote\])', $test2, $ausgabe, PREG_PATTERN_ORDER);
echo '<pre>'; print_r($ausgabe); echo '</pre>';
Array
(
[0] => Array
(
)
[1] => Array
(
)
[2] => Array
(
)
)
Array
(
[0] => Array
(
[0] => ','index.php?page=Thread&postID=350583#post350583']YOYOY
)
[1] => Array
(
[0] => elgringo [Gast]','index.php?page=Thread&postID=350583#post350583
)
[2] => Array
(
[0] => YOYOY
)
)
?>