[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help
From: |
Bob Proulx |
Subject: |
Re: help |
Date: |
Wed, 14 Jun 2017 18:24:29 -0600 |
User-agent: |
NeoMutt/20170306 (1.8.0) |
Hola!
> I used the expression sed -e "s/\<./\u&/g" to put the first letter
> of each word in uppercase.
> But in the version for ms-dos, I can not get it to work.
> Can you help me ??
The problem is that \u and \U are PCRE Perl Compatible Regular
Expression library features that do not exist in POSIX BRE or ERE
libraries. It depends upon your system's C library regular expression
library and how sed was compiled to use them. This is most likely the
reason it is not working for you on MS-DOS. Likely the MS-DOS version
you are using is using has the POSIX BRE (Basic Regular Expressions)
library which does not support that feature.
For the archive discussion, here is an example which works using the
PCRE but not for BRE or ERE.
$ printf "one two\nthree four\n" | sed "s/\<./\u&/g"
One Two
Three Four
Documentation for the PCRE is in perlre(1).
http://perldoc.perl.org/perlre.html
Please in the future use a better subject line than just "help".
Perhaps "help with sed regular expression" in this case. Or anything
better than just help. :-)
Bob
Noble Galante wrote:
> Hola,
> Yo usaba la expresión sed -e "s/\<./\u&/g" , para poner la primera letra
> de cada palabra en mayuscula.
> Pero en la versión para ms-dos, yo no consigo que funcione.
> Podeis ayudarme??
> ---------------------------
> Hello,
> I used the expression sed -e "s / \ <./ \ u & / g" to put the first letter
> of each word in uppercase.
> But in the version for ms-dos, I can not get it to work.
> Can you help me ??
>
> Thanks
- help, Noble Galante, 2017/06/14