--- In [email protected], "Patrick Bierans" <[EMAIL PROTECTED]> wrote:

> 
> Use regular expressions via preg_replace() - something like:
> 
> $title=preg_replace("/[\!\?\(\)[EMAIL PROTECTED]"\/\\\+\=\.,&\*\-\~\`]
+/","",$title);
> 
> http://php.net/preg_replace
>

Thanks Patrick, but it didn't work, I played around with it a bit but 
couldn't get it to work, though I managed to not get any error 
messages (grin)... I guess it's not so simple after all. The problem I 
am having is when the title of the article is made into the page name, 
most of the time is works fine, ex.

(this is an example of a title of an article)
When Birds Fly

The code makes it the web page name and it looks like this:

When_Birds_Fly.html

The problem occurs when the article title has a character like !?#$...

When Birds Fly!

Comes out:

When_Birds_Fly!.html

The code also creates an index page pointing to all the HTML files it 
created, the index page would call the file:

When_Birds_Fly%21.html

I have to go in and remove the ! from the file name and remove the 
reference to %21 in the index html. I hope this is making some sort of 
sense, I just want to remove these characters in the article names 
before they are made into the name of the page. It does have a way to 
replace the spaces between the words with underscores, I assumed that 
I would also be able to remove these characters as well. I would be 
willing to let you (or anyone else for that matter) see the whole set 
of files I have that does this, it's nicely zipped up and ready to be 
installed, at least that part was simple enough for me to do :)

Anyhoo, thanks for the help, for now I will just manually change these 
files as they crop up.

Wretha





Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to