[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: escaped sed metacharacters
From: |
Eric Blake |
Subject: |
Re: escaped sed metacharacters |
Date: |
Wed, 09 Sep 2009 19:26:45 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Ralf Wildenhues on 9/9/2009 1:12 PM:
> rehashing the discussion here:
> <http://thread.gmane.org/gmane.comp.gcc.devel/108348/focus=108368>
>
> * Eric Blake wrote on Mon, Aug 31, 2009 at 01:36:07PM CEST:
>> True. I guess I'll find time to visit this patch, if no one beats me to it.
>
> Lemme try to beat you to it. It seems that that a sweep over the
> documentation to remove ',' as sed 's' separator was not necessary,
> since we used constant regular expression strings mostly (as opposed
> to expanded shell variables containing files names or so).
>
> So I think this should document things appropriately. Any further
> comments before I apply (tomorrow or so) and add Dave to THANKS
> (which email address should I use)?
>
> address@hidden rejects @samp{s/[^/]*$//}: use @samp{s,[^/]*$,,}.
> address@hidden rejects @samp{s/[^/]*$//}: use @samp{s%[^/]*$%%}.
> +Even escaped, patterns should not include separators that are also used
s/Even escaped/Even when escaped/
> +as @command{sed} metacharacters. For example, GNU sed 4.0.9 rejects
> address@hidden,address@hidden,address@hidden,,}, while sed 4.1 strips the
> backslash before the comma
> +before evaluating the basic regular expression.
Let others have a chance to reply, but I'm okay with the patch with just
that change.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkqoVdUACgkQ84KuGfSFAYAhWwCgiQ1h6VWYSVVNwW0T0eSVGB6n
lcsAnRBH5csMAVKZxWjzl20ZIojM8wWA
=vGTz
-----END PGP SIGNATURE-----