p13rameshk
New Member
- Joined
- Jan 27, 2017
- Messages
- 3
hi all,
I am facing trouble constructing a regexp replace function.
For example,
current string: "I need help", he replied.
characters to be replaced: "I need help", (including the quotations and the comma)
final string expected: he replied.
Th regexp I am trying to use is ".+",
My code looks like:
Sub RegEx_Tester()
Set RegExp = CreateObject("vbscript.regexp")
RegExp.Global = True
RegExp.IgnoreCase = False
RegExp.Pattern = "".+","
I am getting the Expected: end of statement error.
Please help me resolve this. I have enabled RedExp in tools--> References
Thanks,
RK
I am facing trouble constructing a regexp replace function.
For example,
current string: "I need help", he replied.
characters to be replaced: "I need help", (including the quotations and the comma)
final string expected: he replied.
Th regexp I am trying to use is ".+",
My code looks like:
Sub RegEx_Tester()
Set RegExp = CreateObject("vbscript.regexp")
RegExp.Global = True
RegExp.IgnoreCase = False
RegExp.Pattern = "".+","
I am getting the Expected: end of statement error.
Please help me resolve this. I have enabled RedExp in tools--> References
Thanks,
RK