[EMAIL PROTECTED]]
> Sent: Thursday, April 11, 2002 1:40 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: Re: Matching last comma (not last character)
>
>
> On , [EMAIL PROTECTED] said:
>
> >I used the regex in the end, the list will only ever be a
> few
On , [EMAIL PROTECTED] said:
>I used the regex in the end, the list will only ever be a few elements
>long (and the script doesn't need to be efficient). Can't say I
>understand it completely though (I was with you up until the first
>comma) :)
Ok, here's an explanation:
>> s/,(?=[^,]*$)/, or/
Thanks, it works great.
I used the regex in the end, the list will only ever be a few elements long (and the
script doesn't need to be efficient). Can't say I understand it completely though (I
was with you up until the first comma) :)
Apologies for my mail client. It's a web-based dohickey th
here is your substitution.. (haven't tested it but should work).
s/,([^,]*)$/, or$1/;
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: None
> To: [EMAIL PROTECTED]
> Subject: Matching last comma (not last character)
>
>
> Hi,
>
> I've got a comma sepa
[What mail client are you using? It refuses to include a Date: header]
On , [EMAIL PROTECTED] said:
>apples, oranges, pears
>
>I'd like to make it reads:
>
>apples, oranges, or pears
No need to use a regex, especially since a regex will have to go through
the whole string.
# if there is a c