in reply to Truncating Last Sentence
I have decided to use: $lRow =~ s/\.[^.]+$/./;
Let me try to decode the RegEx:
Look for a period followed by OPTIONAL number of non-period characters followed by the EOL char. Substitue all of these with a single period.
The [^.] solves the greedy problem by making sure there is some non-period characters between things. Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Truncating Last Sentence
by Belgarion (Chaplain) on May 14, 2004 at 21:15 UTC | |
|
Re: Re: Truncating Last Sentence
by paulbort (Hermit) on May 17, 2004 at 18:19 UTC |