[ < < < Home ]
[ < < Reference Start ]
[ < Reference Contents ]
[ < Previous=PDGREPPE Single Bytes ]
[ Next=PDGREPPE Double Bytes > ]
These help specify a single byte as a member of a set of a certain type. Types like "\a" that means one a,b,c... LETTER search for a byte within that set. To just find one byte that is explicitly within that type use a single escaped byte. For example: "\S" represents a WhiteSpace byte (see \S later) and this will find the next white space byte if present. To find a byte WITHIN a certain group of types, use a [Range] with a description of the types inside the [Range] like "[\a\d]" to find a letter "\a" or digit "\d" byte. Here is a listing of the byte types that are of the form <BackSlash><Letter>:Desc.:Range + Desc.:(Number of charactersin Range) \a Abc... letter byte [a-zA-Z] (52) \b Back space [\8] \c ASCII Control byte [\0-\31\127] (33) \d decimal Digit byte [0-9] (10) \e Escape [\27] \f Form feed [\12] \g Gong or bell [\7] \h Hexadecimal byte [0-9A-Fa-f] (22) \i ASCII Invisible byte [\0-\32\127] (34) \j j j \k k k \l Lower case byte [a-z] (26) \m Math byte [%()*+-./0-9<=>^] (22) \n NewLine(UNIX) or line feed [\10] \o o o \p Punctuation byte [!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~] (32) \q Single Quote ['] \r Return or NewLine(AppleMac) [\13] \s Space [\32] \t Tab [\9] \u Upper case byte [A-Z] (26) \v User Variable byte option -jv<d> Variable byte range else \V \w User Word byte option -jw<d> Word byte range else \W \x x x \y y y \z Any byte [\0-\255] \A ASCII byte [\0-\127] (128) \B B B \C Consonant byte (English) [bcdfghjklmnpqrstvwxzB-DF-HJ-NP-TV-XZ] (40) \D D D \E Equal [\61] or = \F F F \G ASCII Graphical byte [\33-\126] (94) \H H H \I I I \J J J \K K K \L L L \M M M \N NewLine byte [\10\13] (when in [Range]) \O vOwel byte (English) [aeiouyAEIOUY] (12) \P PerCent [\37] or % \Q Double Quote [\34] or " \R R R \S White Space byte [\9-\13\32] (6) \T T T (becomes [\s\t]) \U Upper case byte [A-Z] \V Standard Variable byte [0-9A-Z_a-z] (default variable byte range) \W Standard Word byte [0-9A-Za-z] (default word byte range (62)) \X X X \Y Y Y \Z Z Z pdgreppe -1 -Hjc "\S+" file_id.diz ..."\S+" finds some "white Space" (\S) areas in file_id.diz. pdgreppe -1 -Hjc "\h+" file_id.diz ..."\h+" finds some areas in file_id.diz that contain hexadecimal digits ([A-Fa-f0-9]). pdgreppe -Hjc "\p+" file_id.diz ..."\p+" finds all punctuation (\p) areas in file_id.diz. Notes: The use of a [Range] extension byte like "-" in [<A>-<Z>] has NO significance for byte TYPES of more than one byte. The pattern matcher cannot process a range of [\a-\p] since both alphabetic (\u) and punctuation (\p) type byte sets have members that cross each other's boundaries. Convenience Type Bytes: These allow certain common bytes to be entered without having to use their literal values by keyboard or other means. They are any of b,e,f,g,n,q,r,s,t,Q,P preceded by a backslash, eg "\b". Each represents ONE byte that it exactly corresponds to, eg "\s" is a space byte. \E, \P and \Q are can be used to include characters in a pattern used by the DOS shell in batch files and command lines so the DOS shell or batch files are not affected by them. Example: \E represents the equal character "=" and can help include the character "=" in a DOS ENVIRONMENT variable. The DOS set command can more easily set a variable pattern to include the equal character of the string "x = y" as set thisPat="x \E y" \P or escaped Percent also escapes the magic interpretation of the "%" Marked Group Data match symbol, e.g. set RATING="96\P" to set the ENVIRONMENT variable RATING to the string "96%". \s and \t and \r and \n are good for entering White Space characters as spaces, tabs, return and newline characters. All of these also take effect in REPLACE patterns discussed later. Numerically specified bytes in Ranges: The following are single byte escape sequences that represent a range of bytes or an alphabetic representation of a byte that would have been difficult to enter by the keyboard. The escape byte used is the backslash "\". They can represent ASCII bytes 0 to 255. \<0-255> byte 0 to 255 DECIMAL \0b<0-11111111> byte 0 to 255 Binary \0o<0-377> byte 0 to 255 Octal \0d<0-255> byte 0 to 255 Decimal \0h<0-ff> byte 0 to 255 Hex \0x<0-ff> byte 0 to 255 Hex The one byte that is not allowed to be a literal part of the user input pattern is the ASCII 0 byte. Note the ASCII 0 byte is NOT the byte representing the number 0 : its ASCII byte is 48. The ASCII 0 byte is almost impossible to enter by the keyboard, but can be represented by a pattern sequence like "\0". So when needing an ASCII 0 byte as part of the pattern, just use something like "\0". To delimit these numeric sequences from a following byte, use a Pattern Separator sequence, e.g. an ASCII 0 followed by the number bytes "777" can be given as "\0,777", so that it is not interpreted as being ASCII 77 followed by numeric byte "7". See Pattern Separator "," later. pdgreppe -Hjc "\97" file_id.diz ..."\97" finds all letter a's (DECIMAL 97) in file_id.diz. pdgreppe -Hjc "\0d97" file_id.diz ..."\0d97" same as previous. pdgreppe -Hjc "\0h61" file_id.diz ..."\0h61" finds all letter a's (Hex 61) in file_id.diz. pdgreppe -Hjc "\0o141" file_id.diz ..."\0o141" finds all letter a's (Octal 141) in file_id.diz. pdgreppe -Hjc "\0b1100001" file_id.diz ..."\0b1100001" finds all letter a's (Binary 1100001) in file_id.diz.
[ < < < Home ]
[ < < Reference Start ]
[ < Reference Contents ]
[ < Previous=PDGREPPE Single Bytes ]
[ Next=PDGREPPE Double Bytes > ]
© Intelligence Services 1987 - 2008
GPO Box 9, ADELAIDE SA 5001, AUSTRALIA
EMAIL : intlsvs@gmail.com