Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
dec73640
Commit
dec73640
authored
Feb 01, 2001
by
paul@central.snake.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
manual.texi fix tutorial examples that become incorrect when
manual.texi REGEXP became case insensitive.
parent
2165d185
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
5 deletions
+21
-5
Docs/manual.texi
Docs/manual.texi
+21
-5
No files found.
Docs/manual.texi
View file @
dec73640
...
...
@@ -24782,10 +24782,10 @@ To demonstrate how extended regular expressions work, the @code{LIKE} queries
shown above are rewritten below to use @code{REGEXP}.
To find names beginning with @samp{b}, use @samp{^} to match the beginning of
the name
and @samp{[bB]} to match either lowercase or uppercase @samp{b}
:
the name:
@example
mysql> SELECT * FROM pet WHERE name REGEXP "^
[bB]
";
mysql> SELECT * FROM pet WHERE name REGEXP "^
b
";
+--------+--------+---------+------+------------+------------+
| name | owner | species | sex | birth | death |
+--------+--------+---------+------+------------+------------+
...
...
@@ -24794,6 +24794,23 @@ mysql> SELECT * FROM pet WHERE name REGEXP "^[bB]";
+--------+--------+---------+------+------------+------------+
@end example
Prior to MySQL 3.23.4, @code{REGEXP} is case sensitive, and the previous
query will return no rows. To match either lowercase or uppercase @samp{b},
use this query instead:
@example
mysql> SELECT * FROM pet WHERE name REGEXP "^[bB]";
@end example
From MySQL 3.23.4 on, to force a @code{REGEXP} comparison to be case
sensitive, use the @code{BINARY} keyword to make one of the strings a
binary string. This query will match only lowercase @samp{b} at the
beginning of a name:
@example
mysql> SELECT * FROM pet WHERE name REGEXP BINARY "^b";
@end example
To find names ending with @samp{fy}, use @samp{$} to match the end of the
name:
...
...
@@ -24807,11 +24824,10 @@ mysql> SELECT * FROM pet WHERE name REGEXP "fy$";
+--------+--------+---------+------+------------+-------+
@end example
To find names containing a @samp{w}, use
@samp{[wW]} to match either lowercase or uppercase @samp{w}:
To find names containing a lowercase or uppercase @samp{w}, use this query:
@example
mysql> SELECT * FROM pet WHERE name REGEXP "
[wW]
";
mysql> SELECT * FROM pet WHERE name REGEXP "
w
";
+----------+-------+---------+------+------------+------------+
| name | owner | species | sex | birth | death |
+----------+-------+---------+------+------------+------------+
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment