diff -rc grep-2.5.4.orig/doc/grep.1 grep-2.5.4/doc/grep.1
*** grep-2.5.4.orig/doc/grep.1	2008-02-07 03:43:27.000000000 +0000
--- grep-2.5.4/doc/grep.1	2009-05-18 01:03:31.000000000 +0000
***************
*** 710,715 ****
--- 710,723 ----
  .I not
  at the edge of a word.
  The symbol
+ .B \es
+ is a synonym for
+ .B [[:isspace:]]
+ and
+ .B \eS
+ is a synonym for
+ .BR [^[:isspace:]] .
+ The symbol
  .B \ew
  is a synonym for
  .B [[:alnum:]]
diff -rc grep-2.5.4.orig/doc/grep.info grep-2.5.4/doc/grep.info
*** grep-2.5.4.orig/doc/grep.info	2009-02-10 04:36:23.000000000 +0000
--- grep-2.5.4/doc/grep.info	2009-05-18 01:10:03.000000000 +0000
***************
*** 945,950 ****
--- 945,956 ----
  ``\>''
       Match the empty string at the end of word.
  
+ ``\s''
+      Match space, it is a synonym for `[[:space:]]'.
+ 
+ ``\S''
+      Match non-space, it is a synonym for `[^[:space:]]'.
+ 
  ``\w''
       Match word constituent, it is a synonym for `[[:alnum:]]'.
  
***************
*** 2150,2162 ****
  Node: Fundamental Structure30548
  Node: Character Classes and Bracket Expressions32187
  Node: The Backslash Character and Special Expressions35982
! Node: Anchoring36858
! Node: Back-references and Subexpressions37185
! Node: Basic vs Extended37895
! Node: Usage38892
! Node: Reporting Bugs44738
! Node: Copying45400
! Node: GNU Free Documentation License46483
! Node: Index71602
  
  End Tag Table
--- 2156,2168 ----
  Node: Fundamental Structure30548
  Node: Character Classes and Bracket Expressions32187
  Node: The Backslash Character and Special Expressions35982
! Node: Anchoring36985
! Node: Back-references and Subexpressions37312
! Node: Basic vs Extended38022
! Node: Usage39019
! Node: Reporting Bugs44865
! Node: Copying45527
! Node: GNU Free Documentation License46610
! Node: Index71729
  
  End Tag Table
diff -rc grep-2.5.4.orig/doc/grep.texi grep-2.5.4/doc/grep.texi
*** grep-2.5.4.orig/doc/grep.texi	2009-01-31 05:39:54.000000000 +0000
--- grep-2.5.4/doc/grep.texi	2009-05-18 00:58:38.000000000 +0000
***************
*** 1311,1316 ****
--- 1311,1322 ----
  @item @samp{\>}
  Match the empty string at the end of word.
  
+ @item @samp{\s}
+ Match space, it is a synonym for @samp{[[:space:]]}.
+ 
+ @item @samp{\S}
+ Match non-space, it is a synonym for @samp{[^[:space:]]}.
+ 
  @item @samp{\w}
  Match word constituent, it is a synonym for @samp{[[:alnum:]]}.
  
diff -rc grep-2.5.4.orig/src/dfa.c grep-2.5.4/src/dfa.c
*** grep-2.5.4.orig/src/dfa.c	2009-01-25 02:07:37.000000000 +0000
--- grep-2.5.4/src/dfa.c	2009-05-18 01:04:15.000000000 +0000
***************
*** 1018,1023 ****
--- 1018,1036 ----
  	  laststart = 0;
  	  return lasttok = CSET + charclass_index(ccl);
  
+ 	case 's':
+ 	case 'S':
+ 	  if (!backslash || (syntax_bits & RE_NO_GNU_OPS))
+ 	    goto normal_char;
+ 	  zeroset(ccl);
+ 	  for (c2 = 0; c2 < NOTCHAR; ++c2)
+ 	    if (isspace(c2))
+ 	      setbit(c2, ccl);
+ 	  if (c == 'S')
+ 	    notset(ccl);
+ 	  laststart = 0;
+ 	  return lasttok = CSET + charclass_index(ccl);
+ 
  	case 'w':
  	case 'W':
  	  if (!backslash || (syntax_bits & RE_NO_GNU_OPS))
