ªð¦^¦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 : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD