指动尘飞

宇宙中的一粒微尘随着指尖的敲打勾勒出一条优美的抛物线

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  9 Posts :: 1 Stories :: 1 Comments :: 0 Trackbacks

正则表达式的使用
    var country = new RegExp("England");
    OR
    var country = /England/;
   
    //Example:
    var country = new RegExp("England");
    var geographicLocation = "New England";

    document.write("Destination for work: "+geographicLocation+"<<br />>");
    geographicLocation = geographicLocation.replace(country, "Zealand");
    document.write("Destination for vacation: "+geographicLocation);

posted on 2010-10-24 00:27 单人寸 阅读(111) 评论(0)  编辑  收藏 所属分类: 编程

只有注册用户登录后才能发表评论。


网站导航: