[eluser]Bramme[/eluser]
Hey all
I'm trying to format blog titles into strings that can be used in the url. I know I have to use preg_replace, but I've never used regular expressions really and what I'm trying to do is throwing errors.
I first want to strip all non essential characters like '.,?!' etc... and then replace spaces with a dash (-).
So far I have this:
Code:
preg_replace('{[ \t]+}', '-', preg_replace('.|?|!', '', $row['title']))
(I got the {[ \t]+} from the php documentation), but I'm stuck on the points and so. I think that's where the eror occurs: function.preg-replace: No ending delimiter '.' found
Nevermind, found out that the url helper has a function for this.