|
1 | | -<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.384 2007/08/11 03:56:24 tgl Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.385 2007/08/13 01:18:47 tgl Exp $ --> |
2 | 2 |
|
3 | 3 | <chapter id="functions"> |
4 | 4 | <title>Functions and Operators</title> |
@@ -3383,17 +3383,26 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; |
3383 | 3383 | </para> |
3384 | 3384 |
|
3385 | 3385 | <para> |
3386 | | - <productname>PostgreSQL</productname>'s regular expressions are implemented |
3387 | | - using a package written by Henry Spencer. Much of |
3388 | | - the description of regular expressions below is copied verbatim from his |
3389 | | - manual entry. |
| 3386 | + As the last example demonstrates, the regexp split functions ignore |
| 3387 | + zero-length matches that occur at the start or end of the string |
| 3388 | + or immediately after a previous match. This is contrary to the strict |
| 3389 | + definition of regexp matching that is implemented by |
| 3390 | + <function>regexp_matches</>, but is usually the most convenient behavior |
| 3391 | + in practice. Other software systems such as Perl use similar definitions. |
3390 | 3392 | </para> |
3391 | 3393 |
|
3392 | 3394 | <!-- derived from the re_syntax.n man page --> |
3393 | 3395 |
|
3394 | 3396 | <sect3 id="posix-syntax-details"> |
3395 | 3397 | <title>Regular Expression Details</title> |
3396 | 3398 |
|
| 3399 | + <para> |
| 3400 | + <productname>PostgreSQL</productname>'s regular expressions are implemented |
| 3401 | + using a package written by Henry Spencer. Much of |
| 3402 | + the description of regular expressions below is copied verbatim from his |
| 3403 | + manual entry. |
| 3404 | + </para> |
| 3405 | + |
3397 | 3406 | <para> |
3398 | 3407 | Regular expressions (<acronym>RE</acronym>s), as defined in |
3399 | 3408 | <acronym>POSIX</acronym> 1003.2, come in two forms: |
|