summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2025-12-05 15:22:57 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2025-12-24 10:46:58 +0900
commit688c1f6c5e96dfa3e4f6b16c617545ded7c8c0b4 (patch)
tree8253bdb95eeb5b3ddc8f0e6c4c7d16f52da6e1c9 /doc
parente2a58c45b1c79204ae80b3960f44a818ec00b94e (diff)
[DOC] Reword "Pattern Matching" to "Regular Expression"
In ruby, since 3.1 at least, the words "Pattern Matching" should refer the syntax.
Diffstat (limited to 'doc')
-rw-r--r--doc/language/globals.md4
-rw-r--r--doc/string/partition.rdoc4
-rw-r--r--doc/string/rpartition.rdoc4
3 files changed, 6 insertions, 6 deletions
diff --git a/doc/language/globals.md b/doc/language/globals.md
index a4199e488a..905a23ed05 100644
--- a/doc/language/globals.md
+++ b/doc/language/globals.md
@@ -19,7 +19,7 @@ require 'English'
| `$!` | `$ERROR_INFO` | \Exception object or `nil` | `nil` | Yes | Kernel#raise |
| `$@` | `$ERROR_POSITION` | \Array of backtrace positions or `nil` | `nil` | Yes | Kernel#raise |
-### Pattern Matching
+### Regular Expression
| Variable | \English | Contains | Initially | Read-Only | Reset By |
|:-------------:|:-------------------:|-----------------------------------|:---------:|:---------:|-----------------|
@@ -127,7 +127,7 @@ Output:
English - `$ERROR_POSITION`.
-## Pattern Matching
+## Regular Expression
These global variables store information about the most recent
successful match in the current scope.
diff --git a/doc/string/partition.rdoc b/doc/string/partition.rdoc
index 330e6b0398..86c3a9ca0a 100644
--- a/doc/string/partition.rdoc
+++ b/doc/string/partition.rdoc
@@ -17,7 +17,7 @@ Note that in the examples below, a returned string <tt>'hello'</tt>
is a copy of +self+, not +self+.
If +pattern+ is a Regexp, performs the equivalent of <tt>self.match(pattern)</tt>
-(also setting {pattern-matching global variables}[rdoc-ref:language/globals.md@Pattern+Matching]):
+(also setting {pattern-matching global variables}[rdoc-ref:language/globals.md@Regular+Expression]):
'hello'.partition(/h/) # => ["", "h", "ello"]
'hello'.partition(/l/) # => ["he", "l", "lo"]
@@ -30,7 +30,7 @@ If +pattern+ is a Regexp, performs the equivalent of <tt>self.match(pattern)</tt
If +pattern+ is not a Regexp, converts it to a string (if it is not already one),
then performs the equivalent of <tt>self.index(pattern)</tt>
-(and does _not_ set {pattern-matching global variables}[rdoc-ref:language/globals.md@Pattern+Matching]):
+(and does _not_ set {pattern-matching global variables}[rdoc-ref:language/globals.md@Regular+Expression]):
'hello'.partition('h') # => ["", "h", "ello"]
'hello'.partition('l') # => ["he", "l", "lo"]
diff --git a/doc/string/rpartition.rdoc b/doc/string/rpartition.rdoc
index 11b0571bfb..879b6ee286 100644
--- a/doc/string/rpartition.rdoc
+++ b/doc/string/rpartition.rdoc
@@ -23,7 +23,7 @@ The pattern used is:
Note that in the examples below, a returned string <tt>'hello'</tt> is a copy of +self+, not +self+.
If +pattern+ is a Regexp, searches for the last matching substring
-(also setting {pattern-matching global variables}[rdoc-ref:language/globals.md@Pattern+Matching]):
+(also setting {pattern-matching global variables}[rdoc-ref:language/globals.md@Regular+Expression]):
'hello'.rpartition(/l/) # => ["hel", "l", "o"]
'hello'.rpartition(/ll/) # => ["he", "ll", "o"]
@@ -36,7 +36,7 @@ If +pattern+ is a Regexp, searches for the last matching substring
If +pattern+ is not a Regexp, converts it to a string (if it is not already one),
then searches for the last matching substring
-(and does _not_ set {pattern-matching global variables}[rdoc-ref:language/globals.md@Pattern+Matching]):
+(and does _not_ set {pattern-matching global variables}[rdoc-ref:language/globals.md@Regular+Expression]):
'hello'.rpartition('l') # => ["hel", "l", "o"]
'hello'.rpartition('ll') # => ["he", "ll", "o"]