摘要: 原文参考:http://www.smashingmagazine.com/2009/05/06/introduction-to-advanced-regular-expressions/正则表达式(RegEx)是处理字符串获取信息的强大手段。它们通过一种字符串构造成一些匹配模式,然后展现它神奇的魅力。但不幸的是,简单的正则表达式并不满足于处理复杂的模式和符号。为了解决这个困境,你可以使用一些高级的正则。接下来,我们将给您带来高级正则的简单介绍,一共有八个常用的概念和例子。每一个举例都描绘了匹配复杂字符串模式的简单方式。如果你之前没有什么使用正则表达式的经验,请查阅相关的资料^_^1.贪婪模式/ 阅读全文
posted @ 2012-03-05 14:30 isforcode 阅读(156) 评论(0) 推荐(1) 编辑
摘要: 1 --SQL SERVER中的流水号创建2 create table books3 (4 no int identity(1,11),5 bid as right(replicate('0',5) + cast([no] as varchar),6),6 [name] varchar(50)7 );8 insert into books(name) values('t1'); 阅读全文
posted @ 2012-02-29 11:38 isforcode 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 1 --创建表 2 create table test 3 ( 4 id number primary key, 5 name varchar2 not null 6 ); 7 --创建序列 8 create sequence test_seq 9 start with 1 increment by 1;10 11 --创建触发器12 create or replace trigger tri_test_zz13 before insert on test14 for each row15 begin16 select test_seq.nextval into :new.i... 阅读全文
posted @ 2012-02-29 11:04 isforcode 阅读(112) 评论(0) 推荐(0) 编辑