Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

oracleµÄÕýÔò±í´ïʽ(regular expression)¼òµ¥½éÉÜ

Ä¿Ç°£¬ÕýÔò±í´ïʽÒѾ­ÔںܶàÈí¼þÖеõ½¹ã·ºµÄÓ¦Ó㬰üÀ¨*nix£¨Linux, UnixµÈ£©£¬HPµÈ²Ù×÷ϵͳ£¬PHP£¬C#£¬JavaµÈ¿ª·¢»·¾³¡£
 
Oracle 10gÕýÔò±í´ïʽÌá¸ßÁËSQLÁé»îÐÔ¡£ÓÐЧµÄ½â¾öÁËÊý¾ÝÓÐЧÐÔ£¬ Öظ´´ÊµÄ±æÈÏ, Î޹صĿհ׼ì²â£¬»òÕß·Ö½â¶à¸öÕýÔò×é³É
µÄ×Ö·û´®µÈÎÊÌâ¡£
 
Oracle 10gÖ§³ÖÕýÔò±í´ïʽµÄËĸöк¯Êý·Ö±ðÊÇ£ºREGEXP_LIKE¡¢REGEXP_INSTR¡¢REGEXP_SUBSTR¡¢ºÍREGEXP_REPLACE¡£
ËüÃÇʹÓÃPOSIX ÕýÔò±í´ïʽ´úÌæÁËÀϵİٷֺţ¨%£©ºÍͨÅä·û£¨_£©×Ö·û¡£
 
ÌØÊâ×Ö·û£º
'^' Æ¥ÅäÊäÈë×Ö·û´®µÄ¿ªÊ¼Î»Öã¬ÔÚ·½À¨ºÅ±í´ïʽÖÐʹÓ㬴ËʱËü±íʾ²»½ÓÊܸÃ×Ö·û¼¯ºÏ¡£
'$' Æ¥ÅäÊäÈë×Ö·û´®µÄ½áβλÖá£Èç¹ûÉèÖÃÁË RegExp ¶ÔÏóµÄ Multiline ÊôÐÔ£¬Ôò $ ҲƥÅä 'n' »ò 'r'¡£
'.' Æ¥Åä³ý»»Ðзû nÖ®ÍâµÄÈκε¥×Ö·û¡£
'?' Æ¥ÅäÇ°ÃæµÄ×Ó±í´ïʽÁã´Î»òÒ»´Î¡£
'*' Æ¥ÅäÇ°ÃæµÄ×Ó±í´ïʽÁã´Î»ò¶à´Î¡£
'+' Æ¥ÅäÇ°ÃæµÄ×Ó±í´ïʽһ´Î»ò¶à´Î¡£
'( )' ±ê¼ÇÒ»¸ö×Ó±í´ïʽµÄ¿ªÊ¼ºÍ½áÊøλÖá£
'[]' ±ê¼ÇÒ»¸öÖÐÀ¨ºÅ±í´ïʽ¡£
'{m,n}' Ò»¸ö¾«È·µØ³öÏÖ´ÎÊý·¶Î§£¬m=<³öÏÖ´ÎÊý<=n£¬'{m}'±íʾ³öÏÖm´Î£¬'{m,}'±íʾÖÁÉÙ³öÏÖm´Î¡£
'|' Ö¸Ã÷Á½ÏîÖ®¼äµÄÒ»¸öÑ¡Ôñ¡£Àý×Ó'^([a-z]+|[0-9]+)$'±íʾËùÓÐСд×Öĸ»òÊý×Ö×éºÏ³ÉµÄ×Ö·û´®¡£
num Æ¥Åä num£¬ÆäÖÐ num ÊÇÒ»¸öÕýÕûÊý¡£¶ÔËù»ñÈ¡µÄÆ¥ÅäµÄÒýÓá£
ÕýÔò±í´ïʽµÄÒ»¸öºÜÓÐÓõÄÌصãÊÇ¿ÉÒÔ±£´æ×Ó±í´ïʽÒÔºóʹÓ㬠±»³ÆΪBackreferencing. ÔÊÐí¸´ÔÓµÄÌæ»»ÄÜÁ¦
Èçµ÷ÕûÒ»¸öģʽµ½ÐµÄλÖûòÕßָʾ±»´úÌæµÄ×Ö·û»òÕßµ¥´ÊµÄλÖÃ. ±»Æ¥ÅäµÄ×Ó±í´ïʽ´æ´¢ÔÚÁÙʱ»º³åÇøÖУ¬
»º³åÇø´Ó×óµ½ÓÒ±àºÅ, ͨ¹ýÊý×Ö·ûºÅ·ÃÎÊ¡£ ÏÂÃæµÄÀý×ÓÁгöÁË°ÑÃû×Ö aa bb cc ±ä³É
cc, bb, aa.
Select REGEXP_REPLACE('aa bb cc','(.*) (.*) (.*)', '3, 2, 1') from dual£»
REGEXP_REPLACE('ELLENHILDISMIT
cc, bb, aa
'' תÒå·û¡£
 
×Ö·û´Ø£º
[[:alpha:]] ÈκÎ×Öĸ¡£
[[:digit:]] ÈκÎÊý×Ö¡£
[[:alnum:]] ÈκÎ×ÖĸºÍÊý×Ö¡£
[[:space:]] Èκΰ××Ö·û¡£
[[:upper:]] Èκδóд×Öĸ¡£
[[:lower:]] ÈκÎСд×Öĸ¡£
[[:punct:]] Èκαêµã·ûºÅ¡£
[[:xdigit:]] ÈκÎ16½øÖƵÄÊý×Ö£¬Ï൱ÓÚ[0-9a-fA-F]¡£
 
¸÷ÖÖ²Ù×÷·ûµÄÔËËãÓÅÏȼ¶
תÒå·û
(), (?:), (?=), [] Ô²À¨ºÅºÍ·½À¨ºÅ
*, +, ?, {n}, {n,}, {n,m} ÏÞ¶¨·û
^, $, anymetacharacter λÖúÍ˳Ðò
| “»ò”²Ù×÷
 
--²âÊÔÊý¾Ý
create table test(mc varchar2(6


Ïà¹ØÎĵµ£º

ORACLEÈÏÖ¤Åàѵ³£¼ûÎÊÌâ

ORACLEÈÏÖ¤Åàѵ³£¼ûÎÊÌâ
1¡¢ÎÊ£ºÊ²Ã´ÊÇ Oracle ÈÏÖ¤£¿¶¼ÓÐÄÄЩÖÖÀࣿ                              
¡¡¡¡´ð£ºOracle ÈÏÖ¤ÊÇÓÉOracle¹«Ë¾°ä²¼²¢ÊµÊ©µÄÒ»ÏîÈ¨Í ......

oracle½¨¶à¸ödblink

ÓÃtg4mssqlÁ´½Óoracle.
¹ý³Ì²»ÔÚÃèÊö£¬googleºÜ¶à¡£
ÎÊÌ⣺
1¡¢mssql expressµÄʱºò£¬Ê§°Ü
½«serverÓÃתÒå×Ö·ûд³ö£¬³É¹¦¡£
HS_FDS_CONNECT_INFO="SERVER=SHAM0415\\SQLEXPRESS;DATABASE=GMT_KJ"
2¡¢½¨¶à¸öµÄʱºò£¬²»ÄܽâÎö¡£ tnsping ÃüÁî×ܲ»Í¨¹ý¡£
ÕÒÁ˺ܶ࣬ͬһ¸öÌû×Ó£¬×ªÁËÎÞÊý´Î¡£¡£
°¦¡£¡£ÖйúµÄ ......

Oracle index µÄÔËÓÃ

1 ²é¿´Ä³ÕűíµÄindexµÄÏêϸÐÅÏ¢¡££¨column_position´ú±íÑ¡Ôñ˳Ðò£©
select table_name, index_name, column_name, column_position
  from user_ind_columns
 where table_name = 'T_BASE_DATA_DICTIONARY'
 order by table_name, index_name, column_position;
2 ÔÚ´´½¨±íʱ¶ÔÁÐÖ¸¶¨NOT NULLºó»á½ûÓÃN ......

¹ÜÀíºÃOracleÖØ×öÈÕÖ¾Îļþ ÈÃÊý¾Ý¸ßÕíÎÞÓÇ

ÖØ×öÈÕÖ¾ÎļþÊÇOracleÊý¾Ý¿âÖÐÒ»Öַdz£ÖØÒªµÄÈÕÖ¾Îļþ£¬Ò²ÊÇÆäÒ»¸öºÜÓÐÌØÉ«µÄ¹¦ÄÜ¡£ÖØ×öÈÕÖ¾Îļþ»á¼Í¼¶ÔÓÚÊý¾Ý¿âµÄÈκβÙ×÷£¬ÈçÀûÓÃDMLÓï¾ä»òÕßDDLÓï¾ä¶ÔÊý¾Ý½øÐиü¸Ä£¬»òÕßÊý¾Ý¿â¹ÜÀíÔ±¶ÔÊý¾Ý¿â½á¹¹½øÐиü¸Ä£¬¶¼»áÔÚÖØ×öÈÕÖ¾ÖнøÐмǼ¡£
¡¡¡¡¿É¼û£¬µ±Êý¾Ý±»ÒâÍâµÄɾ³ý»òÕßÐ޸ģ¬ÎÒÃÇ¿ÉÒÔÀûÓÃÖØÐÂÈÕÖ¾Îļþ½øÐлָ´; µ±³ö ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ