Gossamer Forum
Home : General : Perl Programming :

Re: [socrates] Can this be simplified?

Quote Reply
Re: [socrates] Can this be simplified? In reply to
The first one doesn't get rid of underscores....but it does get rid of spaces.

To get rid of multiple hypens you could just do:

Code:
$Title =~ s/--+/-/g;

THat may give an error due to the position of the hyphens so if it does just escape the first two, like \-\-
Subject Author Views Date
Thread Can this be simplified? socrates 4243 Nov 17, 2005, 1:20 AM
Thread Re: [socrates] Can this be simplified?
Hargreaves 4113 Nov 17, 2005, 2:36 AM
Thread Re: [Hargreaves] Can this be simplified?
socrates 4103 Nov 22, 2005, 6:20 PM
Post Re: [socrates] Can this be simplified?
Hargreaves 4080 Nov 23, 2005, 2:38 AM