ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] regexpªºreplace¡H

[µo°Ý] regexpªºreplace¡H

[FL-clover¡Bdoor¡B(¤Ñ満¬KµØ)]ªðÇB¡BÆñÇvÇq¡B¡³¡³ÇN¡C[2007¦~¡B2009¦~]
[FL-clover,door,(¤Ñ満¬KµØ)]ªðÇB¡BÆñÇvÇq¡B¡³¡³ÇN¡C[2007¦~¡B2009¦~]

¦p¤W¨Ò­Y­­©w¥u±N²Ä¤@­Ó[]½d³òªºn­Ó¡B¨ú¥N¦¨,  n¤£©T©w


^([^\n[]*?\[[^]]*?)¡B([^]]*\])
$1,$2
¤W­±¤@¦¸¥u¯à¨ú¥N¤@­Ó¡A½Ð°Ý­n«ç¤~¯à³B²zn­Ó¡H

(?=\[*)(¡B)(?=[^]]*\])
³o¦æ¤]¤£¹ï

¨º¦ì¤j¤j¯à±Ð¤@¤U¶Ü
thx

  1. Sub zz()
  2. s = "[FL-clover¡Bdoor¡B(¤Ñ満¬KµØ)]ªðÇB¡BÆñÇvÇq¡B¡³¡³ÇN¡C[2007¦~¡B2009¦~]"
  3. With CreateObject("vbscript.regexp")
  4.     .Pattern = "¡B(?=.*?\].*?\])"
  5.     .Global = True
  6.     Debug.Print .Replace(s, ",")
  7. End With
  8. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¤Hªº§Ö¼Ö¡D¤£¬O¦]¬°¥L¾Ö¦³±o¦h¡A¦Ó¬O¦]¬°¥L­p¸û±o¤Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD