I need to match 2 types of values:
1. Object.Property
2. Object.FuncName("Argument")
For now I try to use something like this:
\w+.\w+(\(.*\))?
\w+.\w+ - makes sure I get expressions like Object.PropertyName
(\(.*\))? - I get any parentheses with arguments inside. As they are wrapped in parentheses and followed by questionmark this part is optional.
So it may be Object.PropName or Object.FuncName('SomeArgHere')
When I use this regex against something like this:
Object.FuncName("SomeArg") = 'SomeValue' AND Object.SomeProp = 'AnotherValue'
In regexhero I have 'SomeValue' AND Object matched as well.
Instead it should match Object.FuncName("SomeArg") and Object.SomeProp
Based on the answer from I tried to use \w+\.\w+(\(.*?\))?\s+MayContain(\[.+,?\ ?\]) to match against things like: Obj.Prop MayContain["value"] AND Obj.Func("Test") MayContain["Other"]. And it match the whole string, in spite of AND