[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sed usage in autoheader
From: |
Paul Eggert |
Subject: |
Re: sed usage in autoheader |
Date: |
Wed, 15 Nov 2000 11:06:15 -0800 (PST) |
> From: Akim Demaille <address@hidden>
> 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.