"\s" in sed?
Tadeus (Eus) Prastowo
0x657573 at googlemail.com
Tue Mar 8 13:42:57 PST 2011
Thank you very much for throwing me a bag of information :-D
My mistake was that I looked only at the doc of sed when the list of
regex given there is not complete.
Eus (FSF member #4445)
In this digital era, where computing technology is pervasive, your
freedom depends on the software controlling those computing devices.
Join free software movement today! It is free as in freedom, not as in
On Tue, Mar 8, 2011 at 7:48 AM, DJ Lucas <dj at linuxfromscratch.org> wrote:
> On 03/07/2011 09:13 AM, Tadeus (Eus) Prastowo wrote:
>> I am in 6.33. Perl-5.12.3 when I read the following sed command:
>> sed -i -e "s|BUILD_ZLIB\s*= True|BUILD_ZLIB = False|"
>> Although I see that "\s" means space character, I cannot find "\s"
>> documented in the info file. Quick googling also does not return a
>> good result about "\s". Where do you guys find that "\s" other than in
>> the source code?
> Google for "regular expressions" or more commonly referred to as "regex"
> Here is a whole site dedicated to it that I just found:
> http://www.regular-expressions.info/reference.html contains your \s
> description explicitly.
> http://www.regular-expressions.info/tutorial.html contains a
> tutorial...it's geared towards windows I think, but good enough. Be
> aware that there are differences in regex implementations as well and
> only some are pointed out in a quick perusal of the tutorial.
> Also of use (regarding sed at least) is this site:
> I've used quite a few of the one liners over the past 10 years or so. :)
> -- DJ Lucas
More information about the lfs-support