mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* re.c: corrected documentation format (again)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
15c47977f1
commit
899fc97c33
2 changed files with 21 additions and 15 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Sat Feb 22 09:54:00 2004 Gavin Sinclair <gsinclair@soyabean.com.au>
|
||||||
|
|
||||||
|
* re.c: corrected documentation format (again)
|
||||||
|
|
||||||
Sat Feb 22 09:43:00 2004 Gavin Sinclair <gsinclair@soyabean.com.au>
|
Sat Feb 22 09:43:00 2004 Gavin Sinclair <gsinclair@soyabean.com.au>
|
||||||
|
|
||||||
* re.c: corrected documentation format (rb_reg_initialize_m)
|
* re.c: corrected documentation format (rb_reg_initialize_m)
|
||||||
|
|
32
re.c
32
re.c
|
@ -1612,25 +1612,27 @@ rb_reg_match_m(re, str)
|
||||||
/*
|
/*
|
||||||
* Document-method: compile
|
* Document-method: compile
|
||||||
*
|
*
|
||||||
* call-seq:
|
* Synonym for <code>Regexp.new</code>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* call-seq:
|
||||||
* Regexp.new(string [, options [, lang]]) => regexp
|
* Regexp.new(string [, options [, lang]]) => regexp
|
||||||
* Regexp.new(regexp) => regexp
|
* Regexp.new(regexp) => regexp
|
||||||
* Regexp.compile(string [, options [, lang]]) => regexp
|
* Regexp.compile(string [, options [, lang]]) => regexp
|
||||||
* Regexp.compile(regexp) => regexp
|
* Regexp.compile(regexp) => regexp
|
||||||
*
|
|
||||||
* Synonym for <code>Regexp.new</code>
|
|
||||||
*
|
*
|
||||||
* Constructs a new regular expression from <i>pattern</i>, which can be either
|
* Constructs a new regular expression from <i>pattern</i>, which can be either
|
||||||
* a <code>String</code> or a <code>Regexp</code> (in which case that regexp's
|
* a <code>String</code> or a <code>Regexp</code> (in which case that regexp's
|
||||||
* options are propagated, and new options may not be specified (a change as of
|
* options are propagated, and new options may not be specified (a change as of
|
||||||
* Ruby 1.8). If <i>options</i> is a <code>Fixnum</code>, it should be one or
|
* Ruby 1.8). If <i>options</i> is a <code>Fixnum</code>, it should be one or
|
||||||
* more of the constants <code>Regexp::EXTENDED</code>,
|
* more of the constants <code>Regexp::EXTENDED</code>,
|
||||||
* <code>Regexp::IGNORECASE</code>, and <code>Regexp::POSIXLINE</code>,
|
* <code>Regexp::IGNORECASE</code>, and <code>Regexp::POSIXLINE</code>,
|
||||||
* <em>or</em>-ed together. Otherwise, if <i>options</i> is not
|
* <em>or</em>-ed together. Otherwise, if <i>options</i> is not
|
||||||
* <code>nil</code>, the regexp will be case insensitive. The <i>lang</i>
|
* <code>nil</code>, the regexp will be case insensitive. The <i>lang</i>
|
||||||
* parameter enables multibyte support for the regexp: `n', `N' = none, `e',
|
* parameter enables multibyte support for the regexp: `n', `N' = none, `e',
|
||||||
* `E' = EUC, `s', `S' = SJIS, `u', `U' = UTF-8.
|
* `E' = EUC, `s', `S' = SJIS, `u', `U' = UTF-8.
|
||||||
*
|
*
|
||||||
* r1 = Regexp.new('^a-z+:\\s+\w+') #=> /^a-z+:\s+\w+/
|
* r1 = Regexp.new('^a-z+:\\s+\w+') #=> /^a-z+:\s+\w+/
|
||||||
* r2 = Regexp.new('cat', true) #=> /cat/i
|
* r2 = Regexp.new('cat', true) #=> /cat/i
|
||||||
* r3 = Regexp.new('dog', Regexp::EXTENDED) #=> /dog/x
|
* r3 = Regexp.new('dog', Regexp::EXTENDED) #=> /dog/x
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue