The Extract Text processor provides different results based on whether named capture groups are enabled.
Here is a like for like example that illustrates this.
|
Property Name | Property Value |
---|---|
regex.result1 | (?s)(.*) |
regex.result2 | (?s).*(bar1).* |
regex.result3 | (?s).*?(bar\\d).* |
regex.result4 | (?s).*?(?:bar\\d).*?(bar\\d).*?(bar3).* |
regex.result5 | (?s).*(bar\\d).* |
regex.result6 | (?s)^(.*)$ |
regex.result7 | (?s)(XXX) |
Attribute Name | Attribute Value |
---|---|
regex.result1 |
|
regex.result2 | bar1 |
regex.result3 | bar1 |
regex.result4 | bar2 |
regex.result4.0 |
|
regex.result4.1 | bar2 |
regex.result4.2 | bar3 |
regex.result5 | bar3 |
regex.result6 |
|
regex.result7 |
Property Name | Property Value |
---|---|
Enable named group support | True |
regex.result1 | (?s)(?<ALL>.* |
regex.result2 | (?s).*(?<BAR1>bar1).* |
regex.result3 | (?s).*?(?<BAR1>bar\d).* |
regex.result4 | (?s).*?(?:bar\d).*?(?<BAR2>bar\d).*?(?<BAR3>bar3).* |
regex.result5 | (?s).*(?<BAR3>bar\d).* |
regex.result6 | (?s)^(?<ALL>.*)$ |
regex.result7 | (?s)(?<MISS>XXX) |
Attribute Name | Attribute Value |
---|---|
regex.result1 |
|
regex.result2.BAR1 | bar1 |
regex.result3.BAR1 | bar1 |
regex.result4.BAR2 | bar2 |
regex.result4.BAR2 | bar2 |
regex.result4.BAR3 | bar3 |
regex.result5.BAR3 | bar3 |
regex.result6.ALL |
|
regex.result7.MISS |