南港摳頂

南港真是鳥不生蛋 卻是跟台北市一樣貴的物價

2009年11月17日 星期二

Pattern Matching in ASP VBScript

str = "[b] aaa [b] bbb [/b] [/b]"

dim re
Set re=new RegExp
re.IgnoreCase =true
re.Global=True

re.Pattern="\[b\](.*?)\[\/b\]"
do while re.test(str)
str = re.replace(str, "<b>$1</b>")
loop

return str -------------------------------------------- 其中 (.*?) 表示任一字元, 並切割入變數$n
張貼者: Clotho 於 5:07 下午
標籤: ASP, Patter Match, Regular Expression, VBScript

沒有留言:

張貼留言

較新的文章 較舊的文章 首頁
訂閱: 張貼留言 (Atom)

網誌存檔

  • ►  2010 (23)
    • ►  12月 (2)
    • ►  8月 (2)
    • ►  7月 (2)
    • ►  6月 (1)
    • ►  4月 (6)
    • ►  3月 (7)
    • ►  2月 (2)
    • ►  1月 (1)
  • ▼  2009 (42)
    • ▼  11月 (4)
      • Pattern Matching in ASP VBScript
      • 雲中漫步——迎接雲計算時代的到來
      • Windows 2008 Server 停用密碼複雜度
      • 安裝Windows Server 2008
    • ►  10月 (2)
    • ►  9月 (13)
    • ►  8月 (2)
    • ►  7月 (8)
    • ►  5月 (1)
    • ►  2月 (5)
    • ►  1月 (7)
  • ►  2008 (32)
    • ►  12月 (2)
    • ►  11月 (4)
    • ►  9月 (4)
    • ►  8月 (2)
    • ►  7月 (3)
    • ►  6月 (6)
    • ►  5月 (3)
    • ►  4月 (7)
    • ►  3月 (1)
  • ►  2007 (33)
    • ►  12月 (8)
    • ►  11月 (7)
    • ►  10月 (2)
    • ►  9月 (3)
    • ►  6月 (4)
    • ►  5月 (2)
    • ►  2月 (7)
  • ►  2006 (1)
    • ►  11月 (1)
  • ►  2005 (1)
    • ►  11月 (1)

關於我自己

Clotho
檢視我的完整簡介
輕柔雅緻主題. 技術提供:Blogger.