Can anyone point me to working examples using TableMatch and leveraging the Regex=TRUE option?
I'm trying to do some pretty simple pattern matching and can't seem to find the trick ...
I've tried both of the following RulesTables (named Entity Mappings):
First version:
| OutputValue | ParsedRuleExpression |
| Entity_B | 310....4110 |
| Entity_A | 310....4130 |
| Entity_B | 310....4135 |
| Entity_A | 310....4140 |
| Entity_A | 310....4160 |
| Entity_B | 310....4210 |
| Entity_A | 310....4220 |
| Entity_A | 310....4230 |
| Entity_A | 310....4240 |
| Entity_B | 310....43.. |
| Entity_C | 310........ |
Second version
| OutputValue | ParsedRuleExpression |
| Entity_B | 310\d\d\d\d4110 |
| Entity_A | 310\d\d\d\d4130 |
| Entity_B | 310\d\d\d\d4135 |
| Entity_A | 310\d\d\d\d4140 |
| Entity_A | 310\d\d\d\d4160 |
| Entity_B | 310\d\d\d\d4210 |
| Entity_A | 310\d\d\d\d4220 |
| Entity_A | 310\d\d\d\d4230 |
| Entity_A | 310\d\d\d\d4240 |
| Entity_B | 310\d\d\d\d43\d\d |
| Entity_C | 310\d\d\d\d\d\d\d\ |
My formulae for the resultant table includes the following:
OutputValue=TableMatch(Entity Mappings,UseRegex=TRUE)
Where my Source Table looks like this:
| ParsedRuleExpression |
| 31031404110 |
| 31031404301 |
| 31031204220 |
| 31000008001 |
I expected that I would get Entity B, Entity B, Entity A and Entity C, respectively.
My understanding from the Regex documentation that Apptio pointed me to, that either "." or "\d" would work being Regex expressions for a single character and a single digit, respectively.
This is the trivial set of input. Hopefully once I understand the "trivial" case, I can get to the more complicated. (And the values and rules table are dynamic, so it's going to be difficult to do this without the Regex option).