On Wed, Apr 27, 2005 at 01:50:57PM -0400, Jay Savage wrote:
> You can drop the stuff from the end, too. If 'ups' is optional and
> the spacing is variable, then of course handle that with *
>
> $description =~
> s/\s*free\+(?:ups)*\s*ground\s+shipping\s*[!]*\s*//i; # or /ig if
> needed
>
>
On 4/27/05, Peter Rabbitson <[EMAIL PROTECTED]> wrote:
> On Wed, Apr 27, 2005 at 01:31:08PM -0400, Jay Savage wrote:
> >
> > Don't make things so complicated. You want to find some words and
> > replace them with nothing. You don't care where in the string the
> > pattern appears. Therefore, you
On Wed, Apr 27, 2005 at 01:31:08PM -0400, Jay Savage wrote:
>
> Don't make things so complicated. You want to find some words and
> replace them with nothing. You don't care where in the string the
> pattern appears. Therefore, you don't have to predict where in the
The word 'ups' is not manda
On 4/27/05, Peter Rabbitson <[EMAIL PROTECTED]> wrote:
> Hello everyone,
> This is the first time I was able to get a complex regex actually working as
> I expect, but I wanted someone to comment on it, in case I am overlooking
> something very major.
> I am trying to throw away a certain string ou
On Wed, Apr 27, 2005 at 12:16:05PM -0500, Peter Rabbitson wrote:
> description =~ s/ #take away free ground shipping text
>
> (?: #non-capturing block for | inclusion
>(^)#start of string
> | #or
>(?<=\S)#lookbehind non-space character