VBScript のプロパティ、Pattern プロパティ ^
Set r = New RegExp str = "abc" r.Pattern = "b" Set Matches = r.Execute(str) MsgBox Matches(0) ' b str = "abc" r.Pattern = "^b" Set Matches = r.Execute(str) MsgBox Matches.Count ' 0
Set r = New RegExp str = "abc" r.Pattern = "b" Set Matches = r.Execute(str) MsgBox Matches(0) ' b str = "abc" r.Pattern = "^b" Set Matches = r.Execute(str) MsgBox Matches.Count ' 0