johnmerlino
Board Regular
- Joined
- Sep 21, 2010
- Messages
- 94
Hey all,
in this snippet of code:
if at any time the current cell as alphanumeric characters in parenthesis, I want to remove3 those alphanumeric characters and the parenthesis. For example, this:
abc & abcd (abc)
to this:
abc & abcd
However, when I run the above code, it does not remove the parens with alpha characters. Im pretty sure the regex is right.
thanks for response
in this snippet of code:
Code:
Set has_parens_with_content = CreateObject("VBScript.RegExp")
With has_parens_with_content
.MultiLine = False
.Global = True
.IgnoreCase = True
.Pattern = "\([A-Za-z0-9]\)"
If has_parens_with_content.test(clean_string) Then
clean_string = has_parens_with_content.Replace(clean_string, " ")
End If
if at any time the current cell as alphanumeric characters in parenthesis, I want to remove3 those alphanumeric characters and the parenthesis. For example, this:
abc & abcd (abc)
to this:
abc & abcd
However, when I run the above code, it does not remove the parens with alpha characters. Im pretty sure the regex is right.
thanks for response