> From: Akim Demaille <[EMAIL PROTECTED]>
> Date: 15 Nov 2000 16:32:18 +0100
>
> Do you mean `s,[^/]*$,,' would work here? Man, how can someone write
> something that broken :(.
Just for the record, Cray is correct: POSIX does not allow
`s/[^/]*$//'. `s,[^/]*$,,' is required to work, though.
> Bruce> never, ever use substitution separator
> Bruce> chars inside of the substitution expressions, period.
I've had good luck with strings like `/foo[\/]bar/' in cases where I
already know from context that the matched string can't contain `\'.
That's portable, as it works with both the traditional and the POSIX
interpretation.