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

°ª¤â­ÌÀ°À° regexp ¨D±Ð §ä¯S©w¼Æ¶qªº¼Æ¦r

°ª¤â­ÌÀ°À° regexp ¨D±Ð §ä¯S©w¼Æ¶qªº¼Æ¦r

¤j¤j­Ì¦n ·Q½Ð°Ý¥Î regexp «ç»ò§ä6­Ó¦ì ©Î8­Ó¦ìªº¼Æ¦r  , ¦Ó¥B¥H2 ©Î 3 ¶}ÀY?
¥H¤U¬O§Úªº¥¼§¹¦¨½d¨Ò ¥u¯à§ä¨ì¼Æ¦r

Private Function format_dn(ByVal DN As String) As String


Set oregexp = CreateObject("vbscript.regexp")
With oregexp
    .Global = True
    .IgnoreCase = True
    .Pattern = "[0-9]+"
    .MultiLine = True
   
    Set omatch = .Execute(DN)
    'MsgBox (omatch(0))
   
    For Each m In omatch
        returntext = returntext & m & vbCrLf
    Next
    format_dn = returntext
   
    'replace the number then exist a-z
    'MsgBox .Replace(DN, "")


   
End With

End Function

½Ð°ª¤âÀ°À°

ÁÂÁ¨â¦ì¤j¤jªºÀ°§U

TOP

        ÀR«ä¦Û¦b : ½_ÁJµ²±o¶V¹¡º¡¡A¶V·|©¹¤U««¡A¤@­Ó¤H¶V¦³¦¨´N¡A´N­n¶V¦³Á¾¨Rªº¯ÝÃÌ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD