What regular expression should I use to replace all occurences of rsRun("RunID") with rsRun(FieldCol("RunID")) or rsWeights("WeightID") with rsWeights(FieldCol("WeightID"))
I am new to regular expressions.
I used
Search - rs(.+)\((.+)\)
Replace with - rs\1(FieldsCol(\2))
It only finds strings where do not have any characters after the search term. So it does not find strings properly in the following statements
If Not IsNull(rsWeights("WEIGHT")) Then mRowWeights(lRow, lWeight) = Val(rsWeights("WEIGHT"))
Also it selects
rSubCol(lRow)) And iSDate(lSubGroup(lGrp))
which I dont want.
Any help is appreciated. Thanks.
Brij
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am using v2.9.
What regular expression should I use to replace all occurences of rsRun("RunID") with rsRun(FieldCol("RunID")) or rsWeights("WeightID") with rsWeights(FieldCol("WeightID"))
I am new to regular expressions.
I used
Search - rs(.+)\((.+)\)
Replace with - rs\1(FieldsCol(\2))
It only finds strings where do not have any characters after the search term. So it does not find strings properly in the following statements
If Not IsNull(rsWeights("WEIGHT")) Then mRowWeights(lRow, lWeight) = Val(rsWeights("WEIGHT"))
Also it selects
rSubCol(lRow)) And iSDate(lSubGroup(lGrp))
which I dont want.
Any help is appreciated. Thanks.
Brij
rs[^(.]+\([^(^).]+\) or rs[a-zA-Z]+\([a-zA-Z"]+\) will do it.
If you don't want rSubCol(lRow)) to be selected, check "Match case" box.
Don
This reply was helpful to me too, although I am not the OP. Thank you Don.
You're welcome, although I am not Don.