String extract Test Object (string-extract)
String extract Test Object (string-extract)
Action to do extract method on strings with regex.
Release in: 3.0.1
Usage:
<string name=""! value=""! regex=""!/>
! - mandatory
About regex: Regular expression .
Example
Example | Behaviour |
---|---|
<string-extract name="testString"
regex="(John) (.+?) "
value="John writes about this, and John Doe writes about that, and John Wayne writes about everything."/> | Using extract method, we can extract the substring by passing a regex pattern. 'testString' will be 'John writes' |
<string-extract name="testStringNull"
regex="invalid "
value="testStringExtract"/> | Using extract method, by passing an inavalid regex pattern. 'testString' will be null. |
, multiple selections available,
Related content
String Test Object (string)
String Test Object (string)
More like this
Assert value (assert-value)
Assert value (assert-value)
More like this
Assert (assert)
Assert (assert)
Read with this
Assert value (assert-value) / deprecated!
Assert value (assert-value) / deprecated!
More like this
String Plugin (@string)
String Plugin (@string)
More like this
File separator (payload:file-separator)
File separator (payload:file-separator)
More like this