Hallo Leute,
ich habe folgenden Code mit regExp:
	
Nun verwende ich aber $str in vielfacher Ausführung, so auch folgendermaßen:
	
Ist es aber möglich, dass in der Ausgabe die Variablen "von Hinten" gelesen werden. Dass dieses hier rauskommt:
	
Ich hoffe, das klar geworden ist, was ich beabsichtige 
							
						
					ich habe folgenden Code mit regExp:
PHP-Code:
	
	
$str = 'site/lib/shelf/book-content.html';
$res = preg_replace("|(\\w*)/?(\\w*)/?(\\w*)/?(\\w*)-?(\\w*)\\.html$|", "$1,$2,$3,$4,$5", $str)
$ar =  explode($res);
/* Ausgabe:
0 => site
1 => lib
2 => shelf
3 => book
4 => content
*/ 
PHP-Code:
	
	
$str = 'shelf/book-content.html';
$res = preg_replace("|(\\w*)/?(\\w*)/?(\\w*)/?(\\w*)-?(\\w*)\\.html$|", "$1,$2,$3,$4,$5", $str)
$ar =  explode($res);
/* Ausgabe:
0 => shelf
1 => book
2 => 
3 => 
4 => content
*/ 
PHP-Code:
	
	
/* Ausgabe:
0 => 
1 =>
2 => shelf
3 => book
4 => content
*/ 
							
						
          
 
							
						
							
						
Kommentar