VBScript のプロパティ、Pattern プロパティ \
Set r = New RegExp str = "abc" & vbCRLF & "abc" r.Pattern = "\na" Set Matches = r.Execute(str) MsgBox Matches(0).FirstIndex ' 4 str = "abc\abc" r.Pattern = "\\a" Set Matches = r.Execute(str) MsgBox Matches(0).FirstIndex ' 3 str = "a(b)c" r.Pattern = "\(.\)" Set Matches = r.Execute(str) MsgBox Matches(0) ' (b)