value - Parse values
Added in version PLT-OS: v2.0.30
Extract data from a value.
Usage:
- command: value <payloadText>
[expect: [hex] <expectText>]
[extract: <extractText>]
[extractKey: <key>...]
Argument |
Description |
---|---|
expectText |
Text to expect, prior to extraction. If the |
extractText |
Regular expression to extract (uses RE2 Syntax, except |
key |
Key(s) in which to store extracted text. To save multiple values, use multiple capture groups. |
Examples
# Extract 2 capture groups
- command: define TEXT "Foobar1234"
- command: value "%TEXT%"
extract: "^(\\D+)(\\d+)$"
extractKey: ALPHA DIGITS
# Match hex values
- command: value "ABC"
expect: hex 414243