|
■No98431 (S さん) に返信 > どの様な正規表現を使えばよろしい > でしょか。
「aで始まりeで終わる英単語」ならば "\ba\S*e\b" でどう でしょか。
With New RegExp .Global = True .IgnoreCase = False 'ここはお好みで .MultiLine = True .Pattern = "\ba\S*e\b"
Dim m As Match, matches As MatchCollection Set matches = .Execute(sourceString) For Each m In matches Debug.Print m.FirstIndex; "-"; (m.FirstIndex + m.Length), "["; m.Value; "]" ' Set children = m.SubMatches ' For Each v In children ' Debug.Print , v ' Next v Next m Set matches = Nothing End With
|