G
Guest
Hi all,
I'm having a problem with a reg ex. Essentiall, I'm trying to isolate
variable declarations from old vbscript where there was no explicit
declaration requirement. This should seem easy enough - just identify by the
assignment statement; except for the fact that vb uses a single '=' token for
comparison as well as assignment. Therefore, I need a regex that will match
assignment statements while excluding if statements.
I tried to do the following:
(?!if)\s*(\w+)\s*=\s*.*
but this statement matches both conditionals and assignments. Basically, I
need the following conditions to hold:
var="var" -> match
if var="var" -> no match
tia,
_howard
I'm having a problem with a reg ex. Essentiall, I'm trying to isolate
variable declarations from old vbscript where there was no explicit
declaration requirement. This should seem easy enough - just identify by the
assignment statement; except for the fact that vb uses a single '=' token for
comparison as well as assignment. Therefore, I need a regex that will match
assignment statements while excluding if statements.
I tried to do the following:
(?!if)\s*(\w+)\s*=\s*.*
but this statement matches both conditionals and assignments. Basically, I
need the following conditions to hold:
var="var" -> match
if var="var" -> no match
tia,
_howard