develooper Front page | perl.perl5.porters | Postings from July 2001

Re: [ID 20010720.010] WHere's [:isprint:]?

Thread Previous | Thread Next
From:
Jeffrey Friedl
Date:
July 20, 2001 22:59
Subject:
Re: [ID 20010720.010] WHere's [:isprint:]?
Message ID:
200107210559.WAA09160@ventrue.corp.yahoo.com

Mark-Jason Dominus <mjd@plover.com> wrote:
|> Michael Fowler pointed out that this was a doc bug.  Patch enclosed.

This patch (to be applied after MJD's) fixes two consistancy nits, and
adds a note about \s and [:space:] being different. (Why are they different?)
	Jeffrey




--- bleedperl/ext/POSIX/POSIX.pod.orig	Fri Jul 20 21:59:26 2001
+++ bleedperl/ext/POSIX/POSIX.pod	Fri Jul 20 22:07:05 2001
@@ -617,7 +617,7 @@
 
 This is identical to the C function, except that it can apply to a single
 character or to a whole string.  Consider using regular expressions and the
-C</[[:lower:]]/> construct instead.  Do B<not> use C</a-z/>.
+C</[[:lower:]]/> construct instead.  Do B<not> use C</[a-z]/>.
 
 =item isprint
 
@@ -636,12 +636,15 @@
 This is identical to the C function, except that it can apply to a single
 character or to a whole string.  Consider using regular expressions and the
 C</[[:space:]]/> construct instead, or the C</\s/> construct.
+(Note that C</\s/> and C</[[:space:]]/> are slightly different in that
+C</[[:space:]]/> can normally match a vertical tab, while C</\s/> does
+not.)
 
 =item isupper
 
 This is identical to the C function, except that it can apply to a single
 character or to a whole string.  Consider using regular expressions and the
-C</[[:upper:]]/> construct instead.  Do B<not> use C</A-Z/>.
+C</[[:upper:]]/> construct instead.  Do B<not> use C</[A-Z]/>.
 
 =item isxdigit
 

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About