Clark, David, so \ has no special meaning to escape special characters
like ], [, :, etc with in [] or is this undefined in the POSIX
standard?

Olga

2012/3/12 Clark J. Wang <[email protected]>:
> 2012/3/10 Guido Berhoerster <[email protected]>
>>
>> * ольга крыжановская <[email protected]> [2012-03-09 20:19]:
>> > Clark, can you point me to the section of the standard which defines
>> > that ] must be the first characters in []? It feels not common sense,
>> > unsymmetrical and sounds like a nightmare for parsers. I believed that
>> > every character with a special meaning for extended regex must be
>> > escaped in cases where the user wants the character literally. Does
>> > the standard really define an exception here?
>>
>>
>> >From the XBD Issue 7 IEEE Std 1003.1-2008, 9.3.5 RE Bracket Expression
>> (online at
>> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_05):
>>
>>    1. ... The right-bracket ( ']' ) shall lose its special meaning and
>>    represent itself in a bracket expression if it occurs first in the list
>>    (after an initial circumflex ( '^' ), if any). Otherwise, it shall
>>    terminate the bracket expression, unless it appears in a collating
>> symbol
>>    (such as "[.].]" ) or is the ending right-bracket for a collating
>> symbol,
>>    equivalence class, or character class.
>
>
> On my Debian 6 system it's also mentioned in misc man pages like grep(1) and
> regex(7).
>>
>>
>> --
>> Guido Berhoerster
>> _______________________________________________
>> ast-users mailing list
>> [email protected]
>> https://mailman.research.att.com/mailman/listinfo/ast-users
>
>



-- 
      ,   _                                    _   ,
     { \/`o;====-    Olga Kryzhanovska   -====;o`\/ }
.----'-/`-/     [email protected]   \-`\-'----.
 `'-..-| /       http://twitter.com/fleyta     \ |-..-'`
      /\/\     Solaris/BSD//C/C++ programmer   /\/\
      `--`                                      `--`

_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to