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