BrtzStfn
8 years agoNew Contributor
regular expression in name mapping template
Hi,
I need help to create templates using regular expressions as a match in the active property; in particular I need:
1) template A, active property WpfControlAutomationId, value= "match every object with AutomationId non null or empty or whitespace" (C# would be !string.IsNullOrWhiteSpace(value))
2) templates B/C/D/...,
- active property ClrFullClassName, value= "Control specific type" (Button/TextBox/...)
- active property WpfControlAutomationId, value= "AutomationId is null or empty or whitespace"
This way it should match every object with AutomationId with the first template, every other with the type specific template.
For the first match I tryed different regex: .+ / (.)+ / ^(?!\s*$).+
For the second: ^$
It seems that it doesn't work anyway, in particular I get a match with the first template for every object or for none of them.
Thank you!