preg_match pattern ?
Posted: Fri Sep 15, 2006 10:24 am
Hello,
First, excuse for my english, i'm french ...
I want to use a regex to extract title of my page in the url.
My page could be : xxxxxxxxxx.html or xxxxxxxxx,2.html
I want to extract this part : xxxxxxxxxx ; ,2 is for navigation.
I try to use :
This is ok without navigation, but this don't work :
The .html is deleted before.
I hope you can understand me ...
Have a nice day
Seb
First, excuse for my english, i'm french ...
I want to use a regex to extract title of my page in the url.
My page could be : xxxxxxxxxx.html or xxxxxxxxx,2.html
I want to extract this part : xxxxxxxxxx ; ,2 is for navigation.
I try to use :
Code: Select all
preg_match(',^(.*)$,', $url_propre, $regs);Code: Select all
preg_match(',^(.*)(\,[0-9]+)?$,', $url_propre, $regs);I hope you can understand me ...
Have a nice day
Seb