From f6e8ca91a0046536ed5ffef60bb818d674fadf54 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 4 Jul 2014 13:07:13 -0400 Subject: Document how to match ASCII characters. --- doc/gawk.texi | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc/gawk.texi') diff --git a/doc/gawk.texi b/doc/gawk.texi index 08fca873..c6520ba3 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -5457,6 +5457,17 @@ With the POSIX character classes, you can write @code{/[[:alnum:]]/} to match the alphabetic and numeric characters in your character set. +@c Thanks to +@c Date: Tue, 01 Jul 2014 07:39:51 +0200 +@c From: Hermann Peifer +Some utilities that match regular expressions provide a non-standard +@code{[:ascii:]} character class; @command{awk} does not. However, you +can simulate such a construct using @code{[\x00-\x7F]}. This matches +all values numerically between zero and 127, which is the defined +range of the ASCII character set. Use a complemented character list +(@code{[^\x00-\x7F]}) to match any single-byte characters that are not +in the ASCII range. + @cindex bracket expressions, collating elements @cindex bracket expressions, non-ASCII @cindex collating elements -- cgit v1.2.3