The core of the Single UNIX Specification, Version 4 is also IEEE Std It was approved by the IEEE Standards Board on December It is the single common revision to IEEE Std. , IEEE Std , and the Base Specifications of The Open Group Single UNIX. The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE . IEEE Std involved a minor update of POSIX It incorporated two minor updates or errata referred to as Technical Corrigenda  ‎IEEE Computer Society · ‎Linux Standard Base · ‎Signal · ‎POSIX Threads.


Author: Zaria Fadel
Country: Oman
Language: English
Genre: Education
Published: 27 February 2016
Pages: 350
PDF File Size: 37.96 Mb
ePub File Size: 33.72 Mb
ISBN: 136-1-48638-630-3
Downloads: 8269
Price: Free
Uploader: Zaria Fadel


A newer edition of this document exists here 9. Regular Expressions Regular Expressions REs provide a mechanism to select specific strings from a set of character strings.

POSIX - Wikipedia

Regular expressions are a context-independent syntax that can represent a wide variety of character sets and character set orderings, where these character sets are interpreted according to the current locale.

While many regular expressions can be interpreted differently depending on the current locale, many features, such as character class expressions, provide for contextual invariance across locales. Some utilities, instead, support the Extended Regular Expressions ERE described in Extended Regular Expressions ; any exceptions for both cases are ieee std 1003.1 in the descriptions of the specific utilities using regular expressions.

Matching shall be based on the bit pattern used for encoding the character, not on the graphic representation of the character.

This means that if a character set contains two or more encodings for a graphic symbol, or if the strings searched contain text encoded in more than one codeset, no attempt is made to search for any other representation of the encoded symbol. If that is required, the ieee std 1003.1 can specify equivalence classes containing all variations of the desired graphic symbol.

The search for a matching sequence starts at the beginning of a string and stops when the first sequence matching the expression is found, where "first" is defined to mean "begins earliest in the string". If the pattern permits a variable number of matching characters and thus there is more than one such sequence starting at that point, ieee std 1003.1 longest such sequence is matched.

Consistent with the whole match being the longest of the leftmost matches, each subpattern, from left to right, shall match the longest possible string.

For this purpose, a null string shall be considered to be longer than no match at all. When a multi-character collating element in a bracket expression see RE Bracket Expression is involved, the longest sequence shall be measured ieee std 1003.1 characters consumed from the string to be matched; that is, the collating element counts not as one element, but as the number of characters it matches.

Invalid REs shall cause the utility or function using the RE to generate an error condition. When invalid is not used, violations of the specified syntax or semantics for REs produce undefined results: The use of regular ieee std 1003.1 is generally associated with text processing.

If during the operation of a standard utility a NUL is included in the text designated to be matched, that NUL may designate the end of the text string for the purposes of matching.


When a standard utility or function that uses regular expressions specifies that pattern matching shall be performed without regard to the case uppercase or lowercase of either data or patterns, then when each character in the string is matched against the pattern, not only the character, ieee std 1003.1 also its case counterpart if anyshall be matched.

This definition of case-insensitive processing is intended to allow matching of multi-character collating elements as well as characters, as each character in the string is matched using both its cases.

Ieee std 1003.1 example, in a locale where "Ch" is a multi-character collating element and where a matching list expression matches such elements, the RE "[[.

The Open Group Base Specifications Issue 7, edition

The implementation shall support any regular expression that does not exceed bytes in length. A bracket expression shall match a single character or a single collating element. Outside those contexts, or when preceded by a backslash, such a character ieee std 1003.1 a BRE that matches the special character itself.


The BRE special characters and the contexts in which they have their special ieee std 1003.1 are as follows: An expression containing a '[' that is not preceded by a backslash and is not part of a bracket expression produces undefined results.

Related Post