掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
複数の変換規則から、元の文字列を別の文字列に変換するには? (ID:126047)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
ひろさんの方法が一番楽かも '第1引数:元文字列、第2引数:変換後文字列、第3引数:変換用条件式 Public Function CreateOtherKeyEx(ByVal strKey As String, _ ByRef strOtherKey As String, _ ByVal strMethod) As Long Dim strWork() As String Set re = new regexp 'Create the RegExp object On Error GoTo ErrHandler strTemp = Split(strMethod, ";") re.Pattern = strTemp(0) strOtherKey = re.replace(strKey, strTemp(1)) CreateOtherKeyEx = 0 Exit Function ErrHandler: CreateOtherKeyEx = -999 End Function かな
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.