mysqlÖеÄÕýÔò±í´ïʽËÑË÷
Óï·¨£º
select * from table_name where column_name regexp 'ÕýÔò±í´ïʽ'
»òÇø·Ö´óСд
select * from table_name where column_name regexp binary 'ÕýÔò±í´ïʽ'
Ö§³ÖµÄÕýÔò±í´ïʽ·ûºÅ£º
. ÈÎÒâ×Ö·û
| »ò£¬È磺a|b|c
[] ·¶Î§£¬±ÈÈ磺[a-z],[0-9],[^0-9]²»°üÀ¨0-9×Ö·û
^ ÔÚ[]ÖбíʾÅųý£¬·ñÔò±íʾƥÅ俪ͷ
\\ תÒ壬È磺\\\±íʾƥÅä\£¬\\.±íʾƥÅä.
* 0¸ö»ò¶à¸ö
+ 1¸ö»ò¶à¸ö
? 0¸ö»ò1¸ö
{n} n¸ö
{n,} ²»ÉÙÓÚn¸ö
{n,m} nµ½m¸ö
$ Æ¥Åä½áβ
=====================
[:alnum:] ÈÎÒâ×ÖĸºÍÊý×Ö£¬Ï൱ÓÚ[a-zA-Z0-9]
[:alpha:] ÈÎÒâ×Ö·û[a-zA-Z]
[:blank:] ¿Õ¸ñºÍÖÆ±í[\\t]
[:cntrl:] ascii¿ØÖÆ×Ö·û
[:digit:] Êý×Ö[0-9]
[:graph:][:print:] ¿É´òÓ¡×Ö·û
[:lower:] Сд×Öĸ
[:upper:] ´óд×Öĸ
[:xdigit:] Ê®Áù½øÖÆÊý[a-fA-F0-9]
ÀýÈ磺[[:digit:]]{4}£¬Æ¥ÅäÈÎÒâ4λÊý×Ö
Ïà¹ØÎĵµ£º
====================================================
Òý×Ô£ºhttp://blog.sina.com.cn/s/blog_538a9d1901008f9g.html
ʲôÊÇC2¼¶°²È«ÐÔ£¿°²È«ÐԵķÖÀàÊÇÔõÑùµÄ£¿(2008-01-30 17:04:39)
DÀࣺ×îµÍ±£»¤£¬±£Áô¸ø²»ÄÜͨ¹ý¸ü¸ß¼¶±ð¼ì²éµÄϵͳ
C1£º½÷É÷±£»¤£¬ÒªÇóÓлùÓÚÓû§¼¶±ðµÄ¿ØÖÆÀ´±£»¤Êý¾Ý£¬Ö÷Òª·ÀÖ ......
ÕâÀïÊ×ÏÈ˵ÏÂoracle·ÖÒ³²»Ïñmysql·ÖÒ³ÄÇô¼òµ¥Ö±½Ólimit ¾Í¿ÉÒÔÁË.
mysql£ºsql ="select * from talbe limit 0,10";
µÚÒ»¸öÊý±íʾϱ꣬¾ÍÊÇ´ÓµÚ¼¸ÌõÊý¾Ý¿ªÊ¼£¬
µÚ¶þ¸öÊý±íʾÿҳÏÔʾ¶àÉÙÌõÊý¾Ý£¬¿ÉÒÔ˵Êǵ±ÄãÈ·¶¨Ã¿Ò³ÏÔʾ¶àÉÙÐÐʱºò£¬Ëü¾ÍÊÇÒ»¸ö¹Ì¶¨µÄÊý¡£
ÕâÀïÐèҪעÒâµÄÊÇ£¬mysqlµÄ·ÃÎÊϱêÊÇ´Ó0¿ªÊ¼µÄ¡£Õ ......
ÐÂÔöÓû§£º
GRANT ALL PRIVILEGES ON *.* TO 'root'@'ÄãµÄÔ¶¶Ëip' IDENTIFIED BY 'ÄãµÄÃÜÂë' WITH GRANT OPTION;
È磺
GRANT ALL PRIVILEGES ON *.* TO 'root'@'10.10.19.220' IDENTIFIED BY '123456' WITH GRANT OPTION;
µÇ¼µ½ÐÂÔöµÄÓû§£º£¨¼ÙÈçÔÊÚȨ»úµÄIPΪ10.10.19.222£©
mysql -uroot -p123456&n ......