The "Comment" field records include samples like:
"Line marker, Fence, Test station (Single: Struct P/S -1.2375V IRF -1.0976V) (ACV: 0.0412V)"
"Direction: DownStreamDate Collected: 5/8/2013:START POS RUN ON , Line marker, Test station, Fence, , Aerial marker , 222 MP 221.89 CALI 0.2 0.3 SUNNY END WARM"
I am attempting to omit all text within parentheses from Comments records in a "CrossingName" Field.
I am using:
Pre-Logic Script Code:
Set re = CreateObject("VBScript.RegExp")
With re
.Pattern = "\([^()]*\)"
.Global = False
.IgnoreCase = False
End With
CrossingName = re.Execute(targetString).Item(0)
The regular expression is not returning every instance of parentheses. I copied this to try and isolate the parentheses text. I want to omit every portion of text inside parentheses. Many records have two sets of parentheses. Other questions did not address this specific scenario. Thank you for your assistance.
Currently the script throws an error and only works on one record. sample