°ª¤âÌÀ°À° regexp ¨D±Ð §ä¯S©w¼Æ¶qªº¼Æ¦r
- ©«¤l
- 79
- ¥DÃD
- 19
- ºëµØ
- 0
- ¿n¤À
- 148
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOW7
- ³nÅ骩¥»
- EXCEL 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2017-5-21
- ³Ì«áµn¿ý
- 2023-3-13
|
°ª¤âÌÀ°À° 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
½Ð°ª¤âÀ°À° |
|
|
|
|
|
|
- ©«¤l
- 79
- ¥DÃD
- 19
- ºëµØ
- 0
- ¿n¤À
- 148
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOW7
- ³nÅ骩¥»
- EXCEL 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2017-5-21
- ³Ì«áµn¿ý
- 2023-3-13
|
|
|
|
|
|
|