www.delorie.com/gnu/docs/regex/regex_13.html   search  
 
Buy the book!


Regex

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.4.2 The Match-one-or-more Operator (+ or \+)

If the syntax bit RE_LIMITED_OPS is set, then Regex doesn't recognize this operator. Otherwise, if the syntax bit RE_BK_PLUS_QM isn't set, then `+' represents this operator; if it is, then `\+' does.

This operator is similar to the match-zero-or-more operator except that it repeats the preceding regular expression at least once; see section 3.4.1 The Match-zero-or-more Operator (*), for what it operates on, how some syntax bits affect it, and how Regex backtracks to match it.

For example, supposing that `+' represents the match-one-or-more operator; then `ca+r' matches, e.g., `car' and `caaaar', but not `cr'.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003