Changeset 13048 in project for chicken


Ignore:
Timestamp:
01/21/09 02:44:44 (11 years ago)
Author:
Ivan Raikov
Message:

Unit regex documentation is now consistent with the new regex API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/chicken-3/manual/Unit regex

    r13010 r13048  
    7272characters, respectively.
    7373
    74 
    75 === regexp*
    76 
    77  [procedure] (regexp* STRING [OPTIONS [TABLES]])
    78 
    79 Returns a precompiled regular expression object for {{string}}. The optional
    80 argument {{OPTIONS}} must be a list of option symbols. The optional argument
    81 {{TABLES}} must be a character definitions table (not defined here).
    82 
    83 
    84 Option Symbols:
    85 
    86 ; caseless : Character case insensitive match
    87 ; multiline : Equivalent to Perl's /m option
    88 ; dotall : Equivalent to Perl's /s option
    89 ; extended : Ignore whitespace
    90 ; anchored : Anchor pattern match
    91 ; dollar-endonly : `$' metacharacter in the pattern matches only at the end of the subject string
    92 ; extra : Currently of very little use
    93 ; notbol : First character of the string is not the beginning of a line
    94 ; noteol : End of the string is not the end of a line
    95 ; ungreedy : Inverts the "greediness" of the quantifiers so that they are not greedy by default
    96 ; notempty : The empty string is not considered to be a valid match
    97 ; utf8 : UTF-8 encoded characters
    98 ; no-auto-capture : Disables the use of numbered capturing parentheses
    99 ; no-utf8-check : Skip valid UTF-8 sequence check
    100 ; auto-callout : Automatically inserts callout items (not defined here)
    101 ; partial : Partial match ok
    102 ; firstline : An unanchored pattern is required to match before or at the first newline
    103 ; dupnames : Names used to identify capturing subpatterns need not be unique
    104 ; newline-cr : Newline definition is `\r'
    105 ; newline-lf : Newline definition is `\n'
    106 ; newline-crlf : Newline definition is `\r\n'
    107 ; newline-anycrlf : Newline definition is any of `\r', `\n', or `\r\n'
    108 ; newline-any : Newline definition is any Unicode newline sequence
    109 ; bsr-anycrlf : `\R' escape sequence matches only CR, LF, or CRLF
    110 ; bsr-unicode : `\R' escape sequence matches only Unicode newline sequence
    111 
    112 ; dfa-shortest : Currently unused
    113 ; dfa-restart : Currently unused
    114 
    115 
    11674=== regexp?
    11775
     
    12482=== string-match-positions
    12583
    126  [procedure] (string-match REGEXP STRING [START])
    127  [procedure] (string-match-positions REGEXP STRING [START])
     84 [procedure] (string-match REGEXP STRING )
     85 [procedure] (string-match-positions REGEXP STRING )
    12886
    129 Matches the regular expression in {{REGEXP}} (a string or a precompiled
    130 regular expression) with
    131 {{STRING}} and returns either {{#f}} if the match failed,
    132 or a list of matching groups, where the first element is the complete
    133 match. If the optional argument {{START}} is supplied, it specifies
    134 the starting position in {{STRING}}.  For each matching group the
     87Matches the regular expression in {{REGEXP}} (a string or a
     88precompiled regular expression) with {{STRING}} and returns either
     89{{#f}} if the match failed, or a list of matching groups, where the
     90first element is the complete match. For each matching group the
    13591result-list contains either: {{#f}} for a non-matching but optional
    13692group; a list of start- and end-position of the match in {{STRING}}
    137 (in the case of {{string-match-positions}}); or the matching
    138 substring (in the case of {{string-match}}). Note that the exact string
    139 is matched. For searching a pattern inside a string, see below.
    140 Note also that {{string-match}} is implemented by calling
    141 {{string-search}} with the regular expression wrapped in {{^ ... $}}.
    142 If invoked with a precompiled regular expression argument (by using
    143 {{regexp}}), {{string-match}} is identical to {{string-search}}.
     93(in the case of {{string-match-positions}}); or the matching substring
     94(in the case of {{string-match}}). Note that the exact string is
     95matched. For searching a pattern inside a string, see below.  Note
     96also that {{string-match}} is implemented by calling {{string-search}}
     97with the regular expression wrapped in {{^ ... $}}.  If invoked with a
     98precompiled regular expression argument (by using {{regexp}}),
     99{{string-match}} is identical to {{string-search}}.
    144100
    145101
Note: See TracChangeset for help on using the changeset viewer.